Class ColorSliderUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SliderUI
javax.swing.plaf.basic.BasicSliderUI
org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderUI
- All Implemented Interfaces:
TransitionAwareUI
A UI delegate for color sliders. The track of the slider visualizes how
changing the value of the slider affects the color.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassTrack mouse movements.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
FieldsModifier and TypeFieldDescriptionprotected ColorSliderModelprotected Integerprotected StateTransitionTrackerListener for transition animations.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidprotected PropertyChangeListenercreatePropertyChangeListener(JSlider slider) protected BasicSliderUI.TrackListenercreateTrackListener(JSlider slider) static ComponentUIprotected Iconprotected Dimensionprotected intGets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders.Returns the model for tracking the transitions.protected voidinstallDefaults(JSlider slider) protected voidinstallListeners(JSlider slider) booleanisInside(MouseEvent me) Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.voidpaintColorTrack(Graphics g, int x, int y, int width, int height, int buffer) voidprotected voidpaintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) protected voidpaintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) protected voidpaintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x) protected voidpaintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y) voidvoidvoidprotected voiduninstallListeners(JSlider slider) Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbSize, calculateTrackBuffer, createChangeListener, createComponentListener, createFocusListener, createScrollListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumSize, getPreferredSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installKeyboardActions, installUI, isDragging, labelsHaveSameBaselines, paint, paintHorizontalLabel, paintLabels, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, setThumbLocation, uninstallDefaults, uninstallKeyboardActions, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValueMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
Field Details
-
componentIndex
-
colorSliderModel
-
stateTransitionTracker
Listener for transition animations.
-
-
Constructor Details
-
ColorSliderUI
Creates a new instance.
-
-
Method Details
-
createUI
-
installDefaults
- Overrides:
installDefaultsin classBasicSliderUI
-
installListeners
- Overrides:
installListenersin classBasicSliderUI
-
uninstallListeners
- Overrides:
uninstallListenersin classBasicSliderUI
-
getThumbSize
- Overrides:
getThumbSizein classBasicSliderUI
-
getPreferredHorizontalSize
- Overrides:
getPreferredHorizontalSizein classBasicSliderUI
-
getPreferredVerticalSize
- Overrides:
getPreferredVerticalSizein classBasicSliderUI
-
getMinimumHorizontalSize
- Overrides:
getMinimumHorizontalSizein classBasicSliderUI
-
getMinimumVerticalSize
- Overrides:
getMinimumVerticalSizein classBasicSliderUI
-
calculateThumbLocation
protected void calculateThumbLocation()- Overrides:
calculateThumbLocationin classBasicSliderUI
-
getThumbIcon
-
paintThumb
- Overrides:
paintThumbin classBasicSliderUI
-
paintTrack
- Overrides:
paintTrackin classBasicSliderUI
-
paintTicks
- Overrides:
paintTicksin classBasicSliderUI
-
paintMajorTickForHorizSlider
- Overrides:
paintMajorTickForHorizSliderin classBasicSliderUI
-
paintMinorTickForHorizSlider
- Overrides:
paintMinorTickForHorizSliderin classBasicSliderUI
-
paintMinorTickForVertSlider
- Overrides:
paintMinorTickForVertSliderin classBasicSliderUI
-
paintMajorTickForVertSlider
- Overrides:
paintMajorTickForVertSliderin classBasicSliderUI
-
paintFocus
- Overrides:
paintFocusin classBasicSliderUI
-
paintColorTrack
-
calculateTrackRect
protected void calculateTrackRect()- Overrides:
calculateTrackRectin classBasicSliderUI
-
calculateTickRect
protected void calculateTickRect()- Overrides:
calculateTickRectin classBasicSliderUI
-
getTickLength
protected int getTickLength()Gets the height of the tick area for horizontal sliders and the width of the tick area for vertical sliders. BasicSliderUI uses the returned value to determine the tick area rectangle. If you want to give your ticks some room, make this larger than you need and paint your ticks away from the sides in paintTicks().- Overrides:
getTickLengthin classBasicSliderUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListenerin classBasicSliderUI
-
createTrackListener
- Overrides:
createTrackListenerin classBasicSliderUI
-
getTransitionTracker
Description copied from interface:TransitionAwareUIReturns the model for tracking the transitions.- Specified by:
getTransitionTrackerin interfaceTransitionAwareUI- Returns:
- Model for tracking the transitions.
-
isInside
Description copied from interface:TransitionAwareUIChecks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.- Specified by:
isInsidein interfaceTransitionAwareUI- Parameters:
me- Mouse event.- Returns:
trueif the mouse position of the specified event lies inside the area of the component designated for transition effects,falseotherwise.
-