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 intFOCUS_PADDINGprotected ColortrackHighlightColor-
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 RectanglecalculateTrackRect()protected intgetPreferredComponentDepth()Return the typical height of a horizontally oriented slider, or the width of the vertically oriented slider.protected DimensiongetThumbSize(int thumbIndex)protected ShapegetTrackOutline()protected booleanisTrackHighlightActive()protected voidpaintFocus(Graphics2D g)protected voidpaintThumb(Graphics2D g, int thumbIndex, float selected)protected voidpaintThumbs(Graphics2D g)protected voidpaintTick(Graphics2D g, float f, int d1, int d2, boolean mirror)protected voidpaintTrack(Graphics2D g)protected voidpaintTrackHighlight(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:MultiThumbSliderUIReturn the typical height of a horizontally oriented slider, or the width of the vertically oriented slider.- Specified by:
getPreferredComponentDepthin 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:
getThumbSizein classMultiThumbSliderUI<T>
-
paintTrack
protected void paintTrack(Graphics2D g)
- Specified by:
paintTrackin 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:
paintFocusin classMultiThumbSliderUI<T>
-
calculateTrackRect
protected Rectangle calculateTrackRect()
- Overrides:
calculateTrackRectin classMultiThumbSliderUI<T>
-
getTrackOutline
protected Shape getTrackOutline()
-
paintThumbs
protected void paintThumbs(Graphics2D g)
- Specified by:
paintThumbsin classMultiThumbSliderUI<T>
-
paintThumb
protected void paintThumb(Graphics2D g, int thumbIndex, float selected)
-
-