Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8102353

Unable to determine the selected ExtensionFilter when a FileChooser closes

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                azvegint Alexander Zvegintsev (Inactive)
                Reporter:
                anthony Anthony Petrov (Inactive)
              • Votes:
                6 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: