Package com.bric.multislider
Class DefaultMultiThumbSliderUI<T>
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- com.bric.multislider.MultiThumbSliderUI<T>
-
- com.bric.multislider.DefaultMultiThumbSliderUI<T>
-
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,EventListener
- Direct Known Subclasses:
AquaMultiThumbSliderUI
,VistaMultiThumbSliderUI
public class DefaultMultiThumbSliderUI<T> extends MultiThumbSliderUI<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.bric.multislider.MultiThumbSliderUI
MultiThumbSliderUI.State, MultiThumbSliderUI.Thumb
-
-
Field Summary
Fields Modifier and Type Field Description protected int
FOCUS_PADDING
protected Color
trackHighlightColor
-
Fields inherited from class com.bric.multislider.MultiThumbSliderUI
animatingRunnable, animatingThread, compListener, DEPTH, focusListener, indication, keyListener, MAX_LENGTH, MIN_LENGTH, mouseInside, mouseIsDown, PREF_LENGTH, propertyListener, slider, THUMB_SHAPE_PROPERTY, thumbIndications, thumbPositions, thumbShapeListener, trackRect
-
-
Constructor Summary
Constructors Constructor Description DefaultMultiThumbSliderUI(MultiThumbSlider<T> slider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Rectangle
calculateTrackRect()
protected int
getPreferredComponentDepth()
Return the typical height of a horizontally oriented slider, or the width of the vertically oriented slider.protected Dimension
getThumbSize(int thumbIndex)
protected Shape
getTrackOutline()
protected boolean
isTrackHighlightActive()
protected void
paintFocus(Graphics2D g)
protected void
paintThumb(Graphics2D g, int thumbIndex, float selected)
protected void
paintThumbs(Graphics2D g)
protected void
paintTick(Graphics2D g, float f, int d1, int d2, boolean mirror)
protected void
paintTrack(Graphics2D g)
protected void
paintTrackHighlight(Graphics2D g)
This optional method highlights the space on the track (by simply adding a shadow) between two thumbs.-
Methods inherited from class com.bric.multislider.MultiThumbSliderUI
addThumb, calculateGeometry, getMaximumSize, getMinimumSize, getPreferredSize, getProperty, getThumb, getThumbCenter, getThumbCenter, getThumbShape, getThumbShape, installUI, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, uninstallUI, updateIndication, validatePositions
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update
-
-
-
-
Field Detail
-
FOCUS_PADDING
protected int FOCUS_PADDING
-
trackHighlightColor
protected Color trackHighlightColor
-
-
Constructor Detail
-
DefaultMultiThumbSliderUI
public DefaultMultiThumbSliderUI(MultiThumbSlider<T> slider)
-
-
Method Detail
-
isTrackHighlightActive
protected boolean isTrackHighlightActive()
-
getPreferredComponentDepth
protected int getPreferredComponentDepth()
Description copied from class:MultiThumbSliderUI
Return the typical height of a horizontally oriented slider, or the width of the vertically oriented slider.- Specified by:
getPreferredComponentDepth
in classMultiThumbSliderUI<T>
- Returns:
- the typical height of a horizontally oriented slider, or the width of the vertically oriented slider.
-
getThumbSize
protected Dimension getThumbSize(int thumbIndex)
- Overrides:
getThumbSize
in classMultiThumbSliderUI<T>
-
paintTrack
protected void paintTrack(Graphics2D g)
- Specified by:
paintTrack
in classMultiThumbSliderUI<T>
-
paintTrackHighlight
protected void paintTrackHighlight(Graphics2D g)
This optional method highlights the space on the track (by simply adding a shadow) between two thumbs.- Parameters:
g
- graphics
-
paintTick
protected void paintTick(Graphics2D g, float f, int d1, int d2, boolean mirror)
-
paintFocus
protected void paintFocus(Graphics2D g)
- Specified by:
paintFocus
in classMultiThumbSliderUI<T>
-
calculateTrackRect
protected Rectangle calculateTrackRect()
- Overrides:
calculateTrackRect
in classMultiThumbSliderUI<T>
-
getTrackOutline
protected Shape getTrackOutline()
-
paintThumbs
protected void paintThumbs(Graphics2D g)
- Specified by:
paintThumbs
in classMultiThumbSliderUI<T>
-
paintThumb
protected void paintThumb(Graphics2D g, int thumbIndex, float selected)
-
-