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

1.4 REGRESSION: Metal & Windows FileChooserUI classes cannot be used without She

    XMLWordPrintable

Details

    • 04
    • x86
    • linux, windows_nt, windows_2000

    Backports

      Description

        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)
        ======================================================================

        Attachments

          Issue Links

            Activity

              People

                leifs Leif Samuelsson (Inactive)
                jkimsunw Jeffrey Kim (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: