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

File Chooser Shortcut Panel folders under on JDK 9

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P3
    • 12
    • client-libs
    • None
    • behavioral
    • minimal
    • Java API
    • SE

    Description

      Summary

      New API method was added to query shortcut panel entries for JFileChooser, since ShellFolder is internal class which is not publicly accessible.

      Problem

      ShellFolder is an internal class, and customers do not currently have a way of querying the default shortcut files on Windows, without exporting this class at compile time.

      Solution

      Solution is to add a new api in javax.swing.filechooser.FileSystemView.java, which can be directly used.

      Specification

      Signatures of the api being added and the one for which the documentation is being updated in that order:

          /**
           * Returns an array of files representing the values which will be 
           * shown in the file chooser shortcuts panel.
           *
           * @return an array of {@code File} objects. The array returned may be possibly empty
           * if there are no appropriate permissions.
           * @since 12
           */
          final public File[] getChooserShortcutPanelFiles() 
      
      
          /**
      
      • Returns an array of files representing the values which will be shown
      • in the file chooser selector
        *
      • @return an array of {@code File} objects. The array returned may be
      • possibly empty if there are no appropriate permissions.
      • @since 9
        */
        public File[]
      getChooserComboBoxFiles()

      Attachments

        1. webrev05.zip
          480 kB
        2. webrev03.zip
          162 kB
        3. webrev02.zip
          122 kB
        4. webrev01.zip
          121 kB

        Issue Links

          Activity

            People

              kaddepalli Krishna Addepalli
              shadowbug Shadow Bug
              Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: