JDK-5105842 : JFileChooser - improvement of directory browsing
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-09-22
  • Updated: 2004-09-23
  • Resolved: 2004-09-23
Related Reports
Duplicate :  
Description

Name: rmT116609			Date: 09/22/2004


A DESCRIPTION OF THE REQUEST :
Let us browse directories using JFileChooser (setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY), setMultiSelectionEnabled(true)).
Initially no subdirectory in list of subdirectories is selected and method getSelectedFile() returns current directory.
Once we select any of subdirectories, it is difficult to return back to selection of the current directory.
  To do it we should go one level up and select the directory. It can be very annoying if the directory contains many subdirectories.

JUSTIFICATION :
Current behavior of JFileChooser is sometimes annoying.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I suggest to make the current directory selected by deselecting currently selected subdirectory either by clicking on selected subdirectory when pressing Ctrl key or by clicking on place outside of all subdirectories.

After pressing button "Up One Level" it would be convenient if previously browsed child directory would be focused (not selected) to make easier consequent browsing subdirectories of a directory.
(Incident Review ID: 311114) 
======================================================================

Comments
EVALUATION The ability to select the current directory as well as some sub-directories can be considered a subset of the more general case of selecting directories in various places in the file system hierarchy. What is needed is a separate directory chooser component, so this will be closed as a duplicate of rfe 4322989. The workaround section for that rfe contains the code for a working directory chooser. The example code may need to be changed to support multiple selections. ###@###.### 2004-09-23
23-09-2004