Skip to content

Commit

Permalink
For consistency, change variable name to FileWidget.FILE_AND_DIRECTOR…
Browse files Browse the repository at this point in the history
…Y_STYLE
  • Loading branch information
tischi committed Jun 27, 2024
1 parent 822fb74 commit a56b35d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/scijava/ui/swing/AbstractSwingUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -180,8 +180,9 @@ public void doRefresh() {
* <ul>
* <li>{@link FileWidget#OPEN_STYLE}</li>
* <li>{@link FileWidget#SAVE_STYLE}</li>
* <li>{@link FileListWidget#FILES_ONLY}</li>
* <li>{@link FileWidget#DIRECTORY_STYLE}</li>
* <li>{@link FileWidget#FILE_AND_DIRECTORY_STYLE}</li>
* <li>{@link FileListWidget#FILES_ONLY}</li>
* <li>{@link FileListWidget#DIRECTORIES_ONLY}</li>
* <li>{@link FileListWidget#FILES_AND_DIRECTORIES}</li>
* </ul>
Expand All @@ -199,7 +200,7 @@ public static FileFilter createFileFilter(final String widgetStyle) {
FileWidget.DIRECTORY_STYLE, FileListWidget.DIRECTORIES_ONLY
);
final List<String> filesAndDirsStyles = Arrays.asList(
FileWidget.FILES_AND_DIRECTORIES, FileListWidget.FILES_AND_DIRECTORIES
FileWidget.FILE_AND_DIRECTORY_STYLE, FileListWidget.FILES_AND_DIRECTORIES
);

final List<String> exts = new ArrayList<>();
Expand Down

0 comments on commit a56b35d

Please sign in to comment.