Module java.desktop

Class BasicSliderUI

Direct Known Subclasses:
MetalSliderUI, SynthSliderUI

public class BasicSliderUI extends SliderUI
A Basic L&F implementation of SliderUI.
  • Field Details

    • POSITIVE_SCROLL

      public static final int POSITIVE_SCROLL
      Positive scroll
      See Also:
    • NEGATIVE_SCROLL

      public static final int NEGATIVE_SCROLL
      Negative scroll
      See Also:
    • MIN_SCROLL

      public static final int MIN_SCROLL
      Minimum scroll
      See Also:
    • MAX_SCROLL

      public static final int MAX_SCROLL
      Maximum scroll
      See Also:
    • scrollTimer

      protected Timer scrollTimer
      Scroll timer
    • slider

      protected JSlider slider
      Slider
    • focusInsets

      protected Insets focusInsets
      Focus insets
    • insetCache

      protected Insets insetCache
      Inset cache
    • leftToRightCache

      protected boolean leftToRightCache
      Left-to-right cache
    • focusRect

      protected Rectangle focusRect
      Focus rectangle
    • contentRect

      protected Rectangle contentRect
      Content rectangle
    • labelRect

      protected Rectangle labelRect
      Label rectangle
    • tickRect

      protected Rectangle tickRect
      Tick rectangle
    • trackRect

      protected Rectangle trackRect
      Track rectangle
    • thumbRect

      protected Rectangle thumbRect
      Thumb rectangle
    • trackBuffer

      protected int trackBuffer
      The distance that the track is from the side of the control
    • trackListener

      protected BasicSliderUI.TrackListener trackListener
      Track listener
    • changeListener

      protected ChangeListener changeListener
      Change listener
    • componentListener

      protected ComponentListener componentListener
      Component listener
    • focusListener

      protected FocusListener focusListener
      Focus listener
    • scrollListener

      protected BasicSliderUI.ScrollListener scrollListener
      Scroll listener
    • propertyChangeListener

      protected PropertyChangeListener propertyChangeListener
      Property change listener
  • Constructor Details

    • BasicSliderUI

      public BasicSliderUI()
      Constructs a BasicSliderUI.
    • BasicSliderUI

      public BasicSliderUI(JSlider b)
      Constructs a BasicSliderUI.
      Parameters:
      b - a slider
  • Method Details

    • getShadowColor

      protected Color getShadowColor()
      Returns the shadow color.
      Returns:
      the shadow color
    • getHighlightColor

      protected Color getHighlightColor()
      Returns the highlight color.
      Returns:
      the highlight color
    • getFocusColor

      protected Color getFocusColor()
      Returns the focus color.
      Returns:
      the focus color
    • isDragging

      protected boolean isDragging()
      Returns true if the user is dragging the slider.
      Returns:
      true if the user is dragging the slider
      Since:
      1.5
    • createUI

      public static ComponentUI createUI(JComponent b)
      Creates a UI.
      Parameters:
      b - a component
      Returns:
      a UI
    • installUI

      public void installUI(JComponent c)
      Installs a UI.
      Overrides:
      installUI in class ComponentUI
      Parameters:
      c - a component
      See Also:
    • uninstallUI

      public void uninstallUI(JComponent c)
      Uninstalls a UI.
      Overrides:
      uninstallUI in class ComponentUI
      Parameters:
      c - a component
      See Also:
    • installDefaults

      protected void installDefaults(JSlider slider)
      Installs the defaults.
      Parameters:
      slider - a slider
    • uninstallDefaults

      protected void uninstallDefaults(JSlider slider)
      Uninstalls the defaults.
      Parameters:
      slider - a slider
    • createTrackListener

      protected BasicSliderUI.TrackListener createTrackListener(JSlider slider)
      Creates a track listener.
      Parameters:
      slider - a slider
      Returns:
      a track listener
    • createChangeListener

      protected ChangeListener createChangeListener(JSlider slider)
      Creates a change listener.
      Parameters:
      slider - a slider
      Returns:
      a change listener
    • createComponentListener

      protected ComponentListener createComponentListener(JSlider slider)
      Creates a composite listener.
      Parameters:
      slider - a slider
      Returns:
      a composite listener
    • createFocusListener

      protected FocusListener createFocusListener(JSlider slider)
      Creates a focus listener.
      Parameters:
      slider - a slider
      Returns:
      a focus listener
    • createScrollListener

      protected BasicSliderUI.ScrollListener createScrollListener(