jsky.util.gui
Class BasicRangeSliderUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.SliderUI
          extended by javax.swing.plaf.basic.BasicSliderUI
              extended by jsky.util.gui.BasicRangeSliderUI
All Implemented Interfaces:
RangeSliderUI
Direct Known Subclasses:
MetalRangeSliderUI

public class BasicRangeSliderUI
extends BasicSliderUI
implements RangeSliderUI

The core repaints for our RangeSlider


Nested Class Summary
 class BasicRangeSliderUI.RangeSliderChangeListener
           
 class BasicRangeSliderUI.RangeSliderTrackListener
           
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicSliderUI
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener
 
Field Summary
protected  Rectangle extRect
           
protected  boolean isDraggingExtent
           
protected  boolean isDraggingThumb
           
protected  boolean showExtent
           
 
Fields inherited from class javax.swing.plaf.basic.BasicSliderUI
changeListener, componentListener, contentRect, focusInsets, focusListener, focusRect, insetCache, labelRect, leftToRightCache, MAX_SCROLL, MIN_SCROLL, NEGATIVE_SCROLL, POSITIVE_SCROLL, propertyChangeListener, scrollListener, scrollTimer, slider, thumbRect, tickRect, trackBuffer, trackListener, trackRect
 
Constructor Summary
BasicRangeSliderUI(JSlider b, boolean showe)
           
 
Method Summary
protected  void calculateExtentLocation()
           
protected  void calculateExtentSize()
           
protected  void calculateGeometry()
           
protected  void calculateLabelRect()
           
protected  void calculateTickRect()
           
protected  void calculateTrackBuffer()
           
protected  void calculateTrackRect()
           
protected  ChangeListener createChangeListener(JSlider slider)
          Data model listener.
protected  PropertyChangeListener createPropertyChangeListener(JSlider slider)
           
protected  BasicSliderUI.TrackListener createTrackListener(JSlider slider)
          Track mouse movements.
static ComponentUI createUI(JComponent c)
           
 boolean extentContains(int x, int y)
           
protected  Dimension getExtentSize()
           
 Dimension getPreferredSize(JComponent c)
           
protected  int getRangeLeft()
           
protected  int getRangeRight()
           
 void installUI(JComponent c)
           
 void paint(Graphics g, JComponent c)
           
 void paintExtent(Graphics g)
           
 void paintThumb(Graphics g)
           
 void paintThumb(Graphics g, Rectangle knobBounds, double theta)
          still relies on "parent" paintThumb
 void paintThumbLocal(Graphics g)
           
 void setExtentLocation(int x, int y)
           
protected  void setRangeMax(int value)
           
protected  void setRangeMin(int value)
           
 boolean thumbContains(int x, int y)
           
 void uninstallUI(JComponent c)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateThumbLocation, calculateThumbSize, createComponentListener, createFocusListener, createScrollListener, drawInverted, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValueLabel, getHighlightColor, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredVerticalSize, getShadowColor, getThumbSize, getTickLength, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, installListeners, isDragging, paintFocus, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintTicks, paintTrack, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, setThumbLocation, uninstallKeyboardActions, uninstallListeners, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extRect

protected Rectangle extRect

isDraggingThumb

protected transient boolean isDraggingThumb

isDraggingExtent

protected transient boolean isDraggingExtent

showExtent

protected transient boolean showExtent
Constructor Detail

BasicRangeSliderUI

public BasicRangeSliderUI(JSlider b,
                          boolean showe)
Method Detail

createUI

public static ComponentUI createUI(JComponent c)

calculateLabelRect

protected void calculateLabelRect()
Overrides:
calculateLabelRect in class BasicSliderUI

calculateTickRect

protected void calculateTickRect()
Overrides:
calculateTickRect in class BasicSliderUI

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Overrides:
getPreferredSize in class BasicSliderUI

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicSliderUI

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicSliderUI

calculateGeometry

protected void calculateGeometry()
Overrides:
calculateGeometry in class BasicSliderUI

calculateExtentSize

protected void calculateExtentSize()

getExtentSize

protected Dimension getExtentSize()

getRangeRight

protected int getRangeRight()

setRangeMax

protected void setRangeMax(int value)

getRangeLeft

protected int getRangeLeft()

setRangeMin

protected void setRangeMin(int value)

calculateExtentLocation

protected void calculateExtentLocation()

calculateTrackBuffer

protected void calculateTrackBuffer()
Overrides:
calculateTrackBuffer in class BasicSliderUI

calculateTrackRect

protected void calculateTrackRect()
Overrides:
calculateTrackRect in class BasicSliderUI

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
Overrides:
createPropertyChangeListener in class BasicSliderUI

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicSliderUI

paintThumb

public void paintThumb(Graphics g)
Overrides:
paintThumb in class BasicSliderUI

paintThumbLocal

public void paintThumbLocal(Graphics g)

paintExtent

public void paintExtent(Graphics g)

paintThumb

public void paintThumb(Graphics g,
                       Rectangle knobBounds,
                       double theta)
still relies on "parent" paintThumb


setExtentLocation

public void setExtentLocation(int x,
                              int y)

createChangeListener

protected ChangeListener createChangeListener(JSlider slider)
Data model listener. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Overrides:
createChangeListener in class BasicSliderUI

createTrackListener

protected BasicSliderUI.TrackListener createTrackListener(JSlider slider)
Track mouse movements. This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Overrides:
createTrackListener in class BasicSliderUI

thumbContains

public boolean thumbContains(int x,
                             int y)
Specified by:
thumbContains in interface RangeSliderUI

extentContains

public boolean extentContains(int x,
                              int y)
Specified by:
extentContains in interface RangeSliderUI


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.