imagej / imagej-ui-swing

ImageJ UI for Java Swing.
BSD 2-Clause "Simplified" License
10 stars 20 forks source link

ScriptEditor - choosing directories is annoying #45

Open hinerm opened 9 years ago

hinerm commented 9 years ago

If I want a directory as a parameter, e.g. in a python script, I have to use:

# @File(label = "Output directory", style = "directory") dstDir

I couldn't find a way to get FileWidget.DIRECTORY_STYLE to work, which seems unfortunate - and even that is quite verbose.

Anyway, with style = "directory" I get an ugly JFileChooser on mac, despite https://github.com/imagej/imagej-ui-swing/pull/19

ctrueden commented 9 years ago

AFAIK, there is no native directory chooser. It is a JFileChooser-specific feature.

hinerm commented 9 years ago

ah.. I just noticed that it wasn't as eye-pleasing as IJ.getDirectory

ctrueden commented 9 years ago

Hmm, I wonder why I didn't use IJ.getDirectory! I vaguely recall there was some reason...