org.jvnet.substance
Class SubstanceSliderUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.SliderUI
          extended by javax.swing.plaf.basic.BasicSliderUI
              extended by javax.swing.plaf.metal.MetalSliderUI
                  extended by org.jvnet.substance.SubstanceSliderUI
All Implemented Interfaces:
Trackable

public class SubstanceSliderUI
extends MetalSliderUI
implements Trackable

UI for sliders in Substance look and feel.

Author:
Kirill Grouchnikov

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.metal.MetalSliderUI
MetalSliderUI.MetalPropertyListener
 
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
 
Fields inherited from class javax.swing.plaf.metal.MetalSliderUI
darkShadowColor, filledSlider, highlightColor, horizThumbIcon, SLIDER_FILL, thumbColor, TICK_BUFFER, tickLength, trackWidth, vertThumbIcon
 
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
SubstanceSliderUI()
          Simple constructor.
 
Method Summary
static ComponentUI createUI(JComponent c)
           
 ButtonModel getButtonModel()
          Returns the button model for tracking the thumb transitions.
protected  void installListeners(JSlider slider)
           
 boolean isInside(MouseEvent me)
          Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
 void paint(Graphics g, JComponent c)
           
 void paintTrack(Graphics g)
           
 
Methods inherited from class javax.swing.plaf.metal.MetalSliderUI
createPropertyChangeListener, getThumbOverhang, getThumbSize, getTickLength, getTrackLength, getTrackWidth, installUI, paintFocus, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintThumb, scrollDueToClickInTrack
 
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createFocusListener, createScrollListener, createTrackListener, drawInverted, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValueLabel, getHighlightColor, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getPreferredHorizontalSize, getPreferredSize, getPreferredVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installDefaults, installKeyboardActions, isDragging, paintHorizontalLabel, paintLabels, paintTicks, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, setThumbLocation, uninstallKeyboardActions, uninstallListeners, uninstallUI, 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
 

Constructor Detail

SubstanceSliderUI

public SubstanceSliderUI()
Simple constructor.

Method Detail

createUI

public static ComponentUI createUI(JComponent c)

paintTrack

public void paintTrack(Graphics g)
Overrides:
paintTrack in class MetalSliderUI

paint

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

getButtonModel

public ButtonModel getButtonModel()
Returns the button model for tracking the thumb transitions.

Returns:
Button model for tracking the thumb transitions.

isInside

public boolean isInside(MouseEvent me)
Description copied from interface: Trackable
Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.

Specified by:
isInside in interface Trackable
Parameters:
me - Mouse event.
Returns:
true if the mouse position of the specified event lies inside the area of the component designated for transition effects, false otherwise.

installListeners

protected void installListeners(JSlider slider)
Overrides:
installListeners in class BasicSliderUI