-
Enhancement
-
Resolution: Fixed
-
P4
-
8
The CommonDialogs.showFileChooser() method returns an instance of the CommonDialogs.FileChooserResult class. An object of this class contains a list of selected files, and also provides a reference to an extension filter selected by a user when they close the file chooser. With a fix for RT-18836 I added some elementary processing of this result object to QuantumToolkit. It supports basic file extension formats such as "*.*" or "*.ext", and for SAVE dialogs it will add the extension to the file name automatically (if it isn't there already).
However, an app may want to specify other types of extension filters (e.g. "*.r??"). Also, an app may specify several extensions for a specific filter (e.g. "*.c" and "*.cpp"), but the current logic will always select the first extension only. Besides, an app may want to know what filter was selected when showing an OPEN dialog as well. This Tweak is to add some public API allowing a developer to implement a more advanced logic around the result of showing a file chooser.
However, an app may want to specify other types of extension filters (e.g. "*.r??"). Also, an app may specify several extensions for a specific filter (e.g. "*.c" and "*.cpp"), but the current logic will always select the first extension only. Besides, an app may want to know what filter was selected when showing an OPEN dialog as well. This Tweak is to add some public API allowing a developer to implement a more advanced logic around the result of showing a file chooser.
- duplicates
-
JDK-8102060 add method FileChooser.getSelectedExtensionFilter
-
- Closed
-
- is blocked by
-
JDK-8102133 Provide Glass support to pre-select extension filter in FileChooser
-
- Resolved
-
- relates to
-
JDK-8098176 Win: unable to save file name with selected extension filter.
-
- Closed
-