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

No method to manipulate Scroll Button or ComboBox Button

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs
    • Fix Understood
    • generic
    • generic

      Name: vi73552 Date: 04/25/99


      Swing provides NO method to set the Colors (or other properties)
      of the ScrollBar button and ComboBox button. Not even via
      UIDefaults. (In fact, there are lots of properties on lots
      of different JComponents that cannot be set. The highlights
      and shadows on many JComponents such as JButton, for example.)

      setOpaque(false) on JScrollBar and JComboBox don't even work.

      This, in my opinion, is a design bug, not an enhancement.
      -------------------------------------------------

      I know you're really not supposed to get involved in serious
      discussions without a support contract, but you did respond,
      and I do appreciate your suggestions, but I must point out
      that there's still a problem so that it might be fixed. So
      you've given me the opportunity to rant...

      I feel this is not a duplicate of bug 4108855, by the way,
      as I'm pointing out more than just that setOpaque() is ignored.
      I'm pointing out there NO WAY to set colors, IN ADDITION to
      setOpaque().


      I am using these properties, but they work for the scroll bar
      track and the thumb slider widget, NOT for the "scroll" buttons.
      It appears to me the L&F is ignoring my wishes.

      Try this out on the "windows" L&F. You will find that the scroll
      bar "up", "down", "left" and "right" arrow scroll buttons, and the
      Combo Box drop-down arrow button, still do not change their colors.
      They still seem to be using color System.control, with associated
      highlight and shadow colors. (I set the properties *after* I set
      the L&F.) And setOpaque(false) on the containing components should,
      in IMO, ripple down to setOpaque(false) on the sub-components.

      While we're at it, I also set properties "Button.background" and
      "Button.foreground", and they work for the basic colors, but they
      do not appear to work for the highlights and shadows. The button
      edges still appear to use System colors. The edges of quite a
      few swing components seem to do the same thing. Are the edges
      part of the L&F (as I suspect,) or are they borders I can
      manipulate? Are there "properties" in UIDefaults I can use for
      borders? I cannot find any...

      And then, there's also no way to set the disabled colors for
      JButtons. This is true of quite a few swing components.

      Oh, how I wish all the Swing components were consistent. Some
      let me set the margins, some not (JLabel.) SOme let me set
      the edges, some don't. Some let me access sub-components
      (like the scroll track and thumb,) some don't. Some let me
      set the disabled colors, some don't. And so it goes. Is
      anyone responsible for the "Big Picture," or is each Swing
      component developed in a vacuum?

      >
      > You can find other properties in files BasicComboBoxUI.java
      > and BasicScrollBarUI.java (.../javax/swing/plaf/basic)

      Hmmm... are there really any properties I can set with these
      classes that will affect the sub-component buttons? I don't
      see any. SO far, with the windows L&F, the only option I
      appear to have is to get access to the buttons themselves
      and manipulate them.

      ---Mark

       
      (Review ID: 56977)
      ======================================================================

            Unassigned Unassigned
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: