Class PamRangeSliderUI

Direct Known Subclasses:
ColourRangeSliderUI

public class PamRangeSliderUI extends PamSliderUI
UI delegate for the RangeSlider component. RangeSliderUI paints two thumbs, one for the lower value and one for the upper value.

PamRangeSliderUI is based on code from Ernie Yu. http://ernienotes.wordpress.com/2010/12/27/creating-a-java-swing-range-slider/ (28/09/2013)

  • Constructor Details

    • PamRangeSliderUI

      public PamRangeSliderUI(PamRangeSlider b)
      Constructs a RangeSliderUI for the specified slider component.
      Parameters:
      b - RangeSlider
  • Method Details

    • installUI

      public void installUI(JComponent c)
      Installs this UI delegate on the specified component.
      Overrides:
      installUI in class BasicSliderUI
    • paint

      public void paint(Graphics g, JComponent c)
      Paints the slider. The selected thumb is always painted on top of the other thumb.
      Overrides:
      paint in class PamSliderUI
    • paintTrack

      public void paintTrack(Graphics g)
      Paints the track.
      Overrides:
      paintTrack in class BasicSliderUI
    • paintThumb

      public void paintThumb(Graphics g)
      Overrides superclass method to do nothing. Thumb painting is handled within the paint() method.
      Overrides:
      paintThumb in class PamSliderUI
    • scrollByBlock

      public void scrollByBlock(int direction)
      Moves the selected thumb in the specified direction by a block increment. This method is called when the user presses the Page Up or Down keys.
      Overrides:
      scrollByBlock in class BasicSliderUI
    • scrollByUnit

      public void scrollByUnit(int direction)
      Moves the selected thumb in the specified direction by a unit increment. This method is called when the user presses one of the arrow keys.
      Overrides:
      scrollByUnit in class BasicSliderUI
    • getUpperThumbRect

      public Rectangle getUpperThumbRect()
    • setUpperThumbRect

      public void setUpperThumbRect(Rectangle upperThumbRect)
    • getRangeSliderColour

      public Color getRangeSliderColour()
    • setRangeSliderColour

      public void setRangeSliderColour(Color rangeColor)
    • getUpperThumbFill

      public Color getUpperThumbFill()
    • getUpperThumbOutline

      public Color getUpperThumbOutline()
    • isUpperThumbSelected

      public boolean isUpperThumbSelected()
    • isUpperDragging

      public boolean isUpperDragging()
    • setUpperThumbFill

      public void setUpperThumbFill(Color upperThumbFill)
    • setUpperThumbOutline

      public void setUpperThumbOutline(Color upperThumbOutline)
    • setUpperThumbSelected

      public void setUpperThumbSelected(boolean upperThumbSelected)
    • setUpperDragging

      public void setUpperDragging(boolean upperDragging)
    • setTrackDragging

      public void setTrackDragging(boolean trackDragging)