-
Enhancement
-
Resolution: Fixed
-
P3
-
1.4.0, 1.4.2
-
04
-
x86
-
linux, windows_nt, windows_2000
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2056988 | 5.0 | Leif Samuelsson | P3 | Resolved | Fixed | tiger |
Name: jk109818 Date: 07/31/2002
FULL PRODUCT VERSION :
build 1.4.0-b92
FULL OPERATING SYSTEM VERSION :
Linux all versions
ADDITIONAL OPERATING SYSTEMS :
Windows all versions
A DESCRIPTION OF THE PROBLEM :
The MetalFileChooserUI and the WindowsFileChooserUI
have a dependence on the class sun.awt.shell.ShellFolder.
This was introduced in the 1.4 release.
This makes it very hard to extend these classes.
I suggest the following changes:
A new public method setShellUse(boolean state)
this should set the private useShell variable.
In line 1661 of the MetalFileChooserUI and
File sf = ShellFolder.getShellFolder(canonical)
this should only occur when useShell is true otherwise
sf = canonical.
Currently exceptions are being thrown and silently caught
at line 1683 causing the directory combo box not to update.
This also applies to line 1863 of the WindowsFileChooserUI.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
An example of where/why you might want to do someting like
this exist as part of the Apache Slide open-source project
src/contrib/webdavgui - the SPFileChooser and
SPMetalFileChooserUI classes, it's basically a filechooser
that lets you browse WebDav resources
EXPECTED VERSUS ACTUAL BEHAVIOR :
The directory combo-box should update when a new directory
has been entered or exited - this is not occuring.
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
see above
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Metal/Windows FileChooserUI classes:
public void setShellUse(boolean state) {
useShell = state;
}
line 1863 in WindowsUI and 1661 in MetalUI
File sf;
if (useShell)
sf = ShellFolder.getShellFolder(canonical);
else
sf = canonical;
(Review ID: 145565)
======================================================================
FULL PRODUCT VERSION :
build 1.4.0-b92
FULL OPERATING SYSTEM VERSION :
Linux all versions
ADDITIONAL OPERATING SYSTEMS :
Windows all versions
A DESCRIPTION OF THE PROBLEM :
The MetalFileChooserUI and the WindowsFileChooserUI
have a dependence on the class sun.awt.shell.ShellFolder.
This was introduced in the 1.4 release.
This makes it very hard to extend these classes.
I suggest the following changes:
A new public method setShellUse(boolean state)
this should set the private useShell variable.
In line 1661 of the MetalFileChooserUI and
File sf = ShellFolder.getShellFolder(canonical)
this should only occur when useShell is true otherwise
sf = canonical.
Currently exceptions are being thrown and silently caught
at line 1683 causing the directory combo box not to update.
This also applies to line 1863 of the WindowsFileChooserUI.
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
An example of where/why you might want to do someting like
this exist as part of the Apache Slide open-source project
src/contrib/webdavgui - the SPFileChooser and
SPMetalFileChooserUI classes, it's basically a filechooser
that lets you browse WebDav resources
EXPECTED VERSUS ACTUAL BEHAVIOR :
The directory combo-box should update when a new directory
has been entered or exited - this is not occuring.
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
see above
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
Metal/Windows FileChooserUI classes:
public void setShellUse(boolean state) {
useShell = state;
}
line 1863 in WindowsUI and 1661 in MetalUI
File sf;
if (useShell)
sf = ShellFolder.getShellFolder(canonical);
else
sf = canonical;
(Review ID: 145565)
======================================================================
- backported by
-
JDK-2056988 1.4 REGRESSION: Metal & Windows FileChooserUI classes cannot be used without She
-
- Resolved
-
- duplicates
-
JDK-4694944 1.4 REGRESSION: JFileChooser no longer works for virtual filesystems
-
- Closed
-
-
JDK-4760448 MetalFileChooserUI should allow user to bypass ShellFolder methods
-
- Closed
-
- relates to
-
JDK-4493369 WindowsFileChooserUI should not call ShellFolder
-
- Resolved
-
-
JDK-4905313 JFileChooser setCurrentDirectory() ignores FileSystemView model
-
- Closed
-