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

BasicFileChooserUI.installListeners() accesses private variable model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • beta
    • generic
    • generic



      Name: stC104175 Date: 04/12/2000


      java version "1.3beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
      Java(TM) HotSpot Client VM (build 1.3beta-O, mixed mode)

      The installListeners() method of BasicFileChooserUI accesses the private
      variable model, adding it as a PropertyChangeListener to the JFileChooser.

      If you over-ride the createModel() & getModel() methods of BasicFileChooser,
      you can use your own model, but a null gets registered as a
      PropertyChangeListener on the file chooser. Because model is private, you
      cannot set it to point to your own model. Instead you have to over-ride the
      installListeners() method, duplicating all of its functionality.

      What should happen is that installListeners should call getModel() rather than
      using the variable model.

      This bug is hindering me from implementing a UI with a usable detailed file
      view.
      (Review ID: 103539)
      ======================================================================

            leifs Leif Samuelsson (Inactive)
            stompkinsunw Sean Tompkins (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: