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

File Chooser Shortcut Panel folders under on JDK 9

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 12
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      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. webrev01.zip
          121 kB
        2. webrev02.zip
          122 kB
        3. webrev03.zip
          162 kB
        4. webrev05.zip
          480 kB

          Issue Links

            Activity

              People

              • Assignee:
                kaddepalli Krishna Addepalli
                Reporter:
                shadowbug Shadow Bug
                Reviewed By:
                Philip Race
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: