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

JFileChooser needs methods to enable and disable "New Folder" button.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.2
    • client-libs



      Name: rmT116609 Date: 07/22/2004


      A DESCRIPTION OF THE REQUEST :
      In some cases we would not like the users to be able to create a directory (folder) in certain situations. So to improve usability there needs to be a way to disable the "New Folder" button. Specifically we would like a public void setNewFolderButtonEnabled(boolean flag) method to enable and disable the "New Folder" button as needed.

      JUSTIFICATION :
      For our extended FileSystemView we have no need to create a folder in our uniquely modified FileSystemView so we would like to have a method to disable the "New Folder" icon.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Calling the new setNewFolderButtonEnabled() method with the argument true would make the "New Folder" button selectable and functional. Calling the new setNewFolderButtonEnabled() method with the argument false would make the "New Folder" button grayed out and not selectable.
      ACTUAL -
      Currently the "New Folder" button in the JFileChooser is always seems to be enabled.

      ---------- BEGIN SOURCE ----------
      jFileChooser = new JFileChooser();
      jFileChooser.setNewFolderButtonEnabled(false);
      ---------- END SOURCE ----------
      (Incident Review ID: 286180)
      ======================================================================

            leifs Leif Samuelsson (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: