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

Metal LookAndFeel not extendible in many places where it should be

XMLWordPrintable

    • generic
    • solaris_10

      >>
      >>Hi Swing team,
      >>
      >>in an effort to get closer to a corporate look and feel I started to
      >>subclass the Metal L&F and implement specific changes. This is NOT going
      >>to be the SAP corporate L&F that some of you may already have heard
      >>about. The SAP L&F is a separate issue which may or may not come in the
      >>future.
      >>
      >>Anyway, I ran into some problem when I was trying to extend some Metal
      >>classes. Here is a list:
      >>
      >>- The (no-arg) constructor of the MetalComboBoxButton class is package
      >>private. It should be at least protected.
      >>
      >>- The images for the buttons for the oneTouchExpandable functionality
      >>are implemented in MetalSplitPaneDivider.java. The images actually
      >>should be in MetalIconFactory.java. (I know that it was me who
      >>implemented that. Back then I didn't know about MetalIconFactory, that's
      >>why the images are now in the wrong place.)
      >>
      >>- The MetalSplitPaneDivider class is package private and cannot be
      >>subclassed outside of the package. I believe this was already logged as
      >>a bug in bugtraq when I was responsible for JSplitPane, but I couldn't
      >>change that for Swing 1.1 due to the change in signature.
      >>
      >>- The MetalInternalFrameTitlePane class is package private and cannot be
      >>subclassed outside of the package.
      >>
      >>- The MetalBumps class is package private and cannot be subclassed
      >>outside of the package.
      >>
      >>- Some of the inner classes in the MetalBorders class are package
      >>private and cannot be subclassed outside of the package.
      >>
      >>- The MetalCheckBoxIcon class should be implemented in the
      >>MetalIconFactory class instead of being kept separate.
      >>
      >>- The color members in the MetalScrollBarUI class are private, but the
      >>method that initializes those colors (configureScrollBarColors()) is
      >>protected. It cannot be sufficiently overwritten. Also overwriting the
      >>paintThumb() method cannot be done nicely since the color members are
      >>not accessible. The color members should be protected.
      >>
      >>- MetalScrollBarUI.configureScrollBarColors() is not being called from
      >>MetalScrollBarUI.installDefaults(). It is not being called at all since
      >>installDefaults() also does not invoke its super().
      >>
      >>- MetalTreeUI.isLocationInExpandControl() overloads
      >>BasicTreeUI.isLocationInExpandControl() instead of overwriting it.
      >>MetalTreeUI.isLocationInExpandControl() is never called due to a
      >>different number of parameters.
      >>
      >>Like I said I only subclassed some files, so I don't know what other
      >>problems may exist. Also I am well aware that most of the required
      >>changes will only be able to make it into major releases of Swing due to
      >>Sun's release restrictions.
      >>
      >>I hope that my comments help to keep track of those issues.
      >>
      >>
      >>Greetings,
      >>Ralph
      >>
      >>
      >>----------------------------------
      >>Ralph Kar | ###@###.###
      >>SAP AG | +49 6227 764674
      >>----------------------------------

            svioletsunw Scott Violet (Inactive)
            amfowler Anne Fowler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: