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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.bric.multislider.MultiThumbSliderUi
MultiThumbSliderUi.State, MultiThumbSliderUi.Thumb
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected Rectangle
protected int
Return the typical height of a horizontally oriented slider, or the width of the vertically oriented slider.protected Dimension
getThumbSize
(int thumbIndex) protected Shape
protected boolean
protected void
protected void
paintThumb
(Graphics2D g, int thumbIndex, float selected) protected void
protected void
paintTick
(Graphics2D g, float f, int d1, int d2, boolean mirror) protected void
protected void
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 Details
-
FOCUS_PADDING
protected int FOCUS_PADDING -
trackHighlightColor
-
-
Constructor Details
-
DefaultMultiThumbSliderUi
-
-
Method Details
-
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
- Overrides:
getThumbSize
in classMultiThumbSliderUi<T>
-
paintTrack
- Specified by:
paintTrack
in classMultiThumbSliderUi<T>
-
paintTrackHighlight
This optional method highlights the space on the track (by simply adding a shadow) between two thumbs.- Parameters:
g
- graphics
-
paintTick
-
paintFocus
- Specified by:
paintFocus
in classMultiThumbSliderUi<T>
-
calculateTrackRect
- Overrides:
calculateTrackRect
in classMultiThumbSliderUi<T>
-
getTrackOutline
-
paintThumbs
- Specified by:
paintThumbs
in classMultiThumbSliderUi<T>
-
paintThumb
-