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 Link icon

    • PamRangeSliderUI Link icon

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

    • installUI Link icon

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

      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 Link icon

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

      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 Link icon

      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 Link icon

      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 Link icon

      public Rectangle getUpperThumbRect()
    • setUpperThumbRect Link icon

      public void setUpperThumbRect(Rectangle upperThumbRect)
    • getRangeSliderColour Link icon

      public Color getRangeSliderColour()
    • setRangeSliderColour Link icon

      public void setRangeSliderColour(Color rangeColor)
    • getUpperThumbFill Link icon

      public Color getUpperThumbFill()
    • getUpperThumbOutline Link icon

      public Color getUpperThumbOutline()
    • isUpperThumbSelected Link icon

      public boolean isUpperThumbSelected()
    • isUpperDragging Link icon

      public boolean isUpperDragging()
    • setUpperThumbFill Link icon

      public void setUpperThumbFill(Color upperThumbFill)
    • setUpperThumbOutline Link icon

      public void setUpperThumbOutline(Color upperThumbOutline)
    • setUpperThumbSelected Link icon

      public void setUpperThumbSelected(boolean upperThumbSelected)
    • setUpperDragging Link icon

      public void setUpperDragging(boolean upperDragging)
    • setTrackDragging Link icon

      public void setTrackDragging(boolean trackDragging)