-
Enhancement
-
Resolution: Fixed
-
P3
-
fx2.0
It's great to see the new javafx.stage.FileChooser class! It works a charm for opening and saving files. We've been able to use it to dump our last remaining traces of Swing, since we were forced to use JFileChooser up until now.
However, it is not possible to use FileChooser to select a directory. If you click the Open button when a directory is selected, all that happens is that the FileChooser dialog starts showing the contents of that directory. We need directory choosing for certain configuration dialogs in the Visual Tool. Possibly (as I saw suggested in another issue) it could be a separate DirectoryChooser class. Alternatively, the list of file extensions could be moved from a property of FileChooser to a parameter of the existing show*Dialog methods, and a new FileChooser.showOpenDirectoryDialog(Window) method added.
For the time being we are accessing the Glass method CommonDialogs.showFolderChooser directly, but that is obviously not very comfortable.
However, it is not possible to use FileChooser to select a directory. If you click the Open button when a directory is selected, all that happens is that the FileChooser dialog starts showing the contents of that directory. We need directory choosing for certain configuration dialogs in the Visual Tool. Possibly (as I saw suggested in another issue) it could be a separate DirectoryChooser class. Alternatively, the list of file extensions could be moved from a property of FileChooser to a parameter of the existing show*Dialog methods, and a new FileChooser.showOpenDirectoryDialog(Window) method added.
For the time being we are accessing the Glass method CommonDialogs.showFolderChooser directly, but that is obviously not very comfortable.
- duplicates
-
JDK-8103950 FileChooser can not choose directory. Alternatively, there is no DirectoryChooser.
- Closed
- is blocked by
-
JDK-8088287 Mac: Add support for title to folder chooser
- Open
-
JDK-8127508 Win: Add support for owner window, initial directory and title to Vista style folder chooser
- Closed