Module java.desktop

Class MetalScrollBarUI

All Implemented Interfaces:
LayoutManager, SwingConstants

public class MetalScrollBarUI extends BasicScrollBarUI
Implementation of ScrollBarUI for the Metal Look and Feel
  • Field Details

    • increaseButton

      protected MetalScrollButton increaseButton
      The increase button.
    • decreaseButton

      protected MetalScrollButton decreaseButton
      The decrease button.
    • scrollBarWidth

      protected int scrollBarWidth
      The width of the scroll bar.
    • FREE_STANDING_PROP

      public static final String FREE_STANDING_PROP
      The property JScrollBar.isFreeStanding.
      See Also:
    • isFreeStanding

      protected boolean isFreeStanding
      The value of the property JScrollBar.isFreeStanding.
  • Constructor Details

    • MetalScrollBarUI

      public MetalScrollBarUI()
      Constructs a MetalScrollBarUI.
  • Method Details

    • createUI

      public static ComponentUI createUI(JComponent c)
      Constructs a new MetalScrollBarUI instance.
      Parameters:
      c - a component
      Returns:
      a new MetalScrollBarUI instance
    • createDecreaseButton

      protected JButton createDecreaseButton(int orientation)
      Returns the view that represents the decrease view.
      Overrides:
      createDecreaseButton in class BasicScrollBarUI
      Parameters:
      orientation - the orientation
      Returns:
      a decrease button
    • createIncreaseButton

      protected JButton createIncreaseButton(int orientation)
      Returns the view that represents the increase view.
      Overrides:
      createIncreaseButton in class BasicScrollBarUI
      Parameters:
      orientation - the orientation
      Returns:
      an increase button
    • setThumbBounds

      protected void setThumbBounds(int x, int y, int width, int height)
      This is overridden only to increase the invalid area. This ensures that the "Shadow" below the thumb is invalidated
      Overrides:
      setThumbBounds in class BasicScrollBarUI
      Parameters:
      x - set the x location of the thumb
      y - set the y location of the thumb
      width - set the width of the thumb
      height - set the height of the thumb
      See Also: