diff --git a/src/main/java/org/scijava/ui/swing/AbstractSwingUI.java b/src/main/java/org/scijava/ui/swing/AbstractSwingUI.java index 87b791f..c638ae0 100644 --- a/src/main/java/org/scijava/ui/swing/AbstractSwingUI.java +++ b/src/main/java/org/scijava/ui/swing/AbstractSwingUI.java @@ -145,7 +145,7 @@ public File chooseFile(final File file, final String style) { final JFileChooser chooser = new JFileChooser(file); if (FileWidget.DIRECTORY_STYLE.equals(style)) { chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - } else if (FileWidget.FILES_AND_DIRECTORIES.equals(style)) { + } else if (FileWidget.FILE_AND_DIRECTORY_STYLE.equals(style)) { chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); } final int rval; diff --git a/src/main/java/org/scijava/ui/swing/widget/SwingFileWidget.java b/src/main/java/org/scijava/ui/swing/widget/SwingFileWidget.java index a14bffb..2d88173 100644 --- a/src/main/java/org/scijava/ui/swing/widget/SwingFileWidget.java +++ b/src/main/java/org/scijava/ui/swing/widget/SwingFileWidget.java @@ -127,8 +127,8 @@ public void actionPerformed(final ActionEvent e) { final String style; if (model.isStyle(FileWidget.DIRECTORY_STYLE)) { style = FileWidget.DIRECTORY_STYLE; - } else if (model.isStyle(FileWidget.FILES_AND_DIRECTORIES)) { - style = FileWidget.FILES_AND_DIRECTORIES; + } else if (model.isStyle(FileWidget.FILE_AND_DIRECTORY_STYLE)) { + style = FileWidget.FILE_AND_DIRECTORY_STYLE; } else if (model.isStyle(FileWidget.SAVE_STYLE)) { style = FileWidget.SAVE_STYLE; } else { @@ -180,8 +180,9 @@ public void doRefresh() { * @@ -199,7 +200,7 @@ public static FileFilter createFileFilter(final String widgetStyle) { FileWidget.DIRECTORY_STYLE, FileListWidget.DIRECTORIES_ONLY ); final List filesAndDirsStyles = Arrays.asList( - FileWidget.FILES_AND_DIRECTORIES, FileListWidget.FILES_AND_DIRECTORIES + FileWidget.FILE_AND_DIRECTORY_STYLE, FileListWidget.FILES_AND_DIRECTORIES ); final List exts = new ArrayList<>();