TransitionAwareUI
public class SubstanceSliderUI extends BasicSliderUI implements TransitionAwareUI
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener
Modifier and Type | Field | Description |
---|---|---|
protected Icon |
horizontalIcon |
Icon for horizontal sliders.
|
protected Icon |
roundIcon |
Icon for sliders without labels and ticks.
|
protected StateTransitionTracker |
stateTransitionTracker |
|
protected static LazyResettableHashMap<BufferedImage> |
trackCache |
Cache of track images.
|
protected Icon |
verticalIcon |
Icon for vertical sliders.
|
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 | Description |
---|---|
SubstanceSliderUI(JSlider slider) |
Simple constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
calculateLabelRect() |
|
protected void |
calculateThumbLocation() |
|
protected void |
calculateTickRect() |
|
protected void |
calculateTrackRect() |
|
static ComponentUI |
createUI(JComponent comp) |
|
protected Icon |
getIcon() |
Returns the thumb icon for the associated slider.
|
Dimension |
getPreferredHorizontalSize() |
|
Dimension |
getPreferredSize(JComponent c) |
|
Dimension |
getPreferredVerticalSize() |
|
protected int |
getThumbOverhang() |
Returns the amount that the thumb goes past the slide bar.
|
protected Dimension |
getThumbSize() |
|
protected int |
getTickLength() |
|
protected int |
getTrackWidth() |
Returns the shorter dimension of the track.
|
StateTransitionTracker |
getTransitionTracker() |
Returns the model for tracking the transitions.
|
protected void |
installDefaults(JSlider slider) |
|
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 |
paintFocus(Graphics g) |
|
void |
paintThumb(Graphics g) |
|
void |
paintTicks(Graphics g) |
|
void |
paintTrack(Graphics g) |
|
void |
setThumbLocation(int x,
int y) |
|
protected void |
uninstallListeners(JSlider slider) |
calculateContentRect, calculateFocusRect, calculateGeometry, calculateThumbSize, calculateTrackBuffer, createChangeListener, createComponentListener, createFocusListener, createPropertyChangeListener, createScrollListener, createTrackListener, drawInverted, getBaseline, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumHorizontalSize, getMinimumSize, getMinimumVerticalSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installKeyboardActions, installUI, isDragging, labelsHaveSameBaselines, paintHorizontalLabel, paintLabels, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, uninstallDefaults, uninstallKeyboardActions, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue
contains, getAccessibleChild, getAccessibleChildrenCount, update
protected StateTransitionTracker stateTransitionTracker
protected Icon horizontalIcon
protected Icon roundIcon
protected Icon verticalIcon
protected static final LazyResettableHashMap<BufferedImage> trackCache
public SubstanceSliderUI(JSlider slider)
slider
- Slider.public static ComponentUI createUI(JComponent comp)
protected void calculateTrackRect()
calculateTrackRect
in class BasicSliderUI
public void paintTrack(Graphics g)
paintTrack
in class BasicSliderUI
protected Dimension getThumbSize()
getThumbSize
in class BasicSliderUI
protected Icon getIcon()
public void paintThumb(Graphics g)
paintThumb
in class BasicSliderUI
public void paint(Graphics g, JComponent c)
paint
in class BasicSliderUI
public StateTransitionTracker getTransitionTracker()
TransitionAwareUI
getTransitionTracker
in interface TransitionAwareUI
public boolean isInside(MouseEvent me)
TransitionAwareUI
isInside
in interface TransitionAwareUI
me
- Mouse event.true
if the mouse position of the specified event
lies inside the area of the component designated for transition
effects, false
otherwise.protected void installDefaults(JSlider slider)
installDefaults
in class BasicSliderUI
protected void installListeners(JSlider slider)
installListeners
in class BasicSliderUI
protected void uninstallListeners(JSlider slider)
uninstallListeners
in class BasicSliderUI
public void paintFocus(Graphics g)
paintFocus
in class BasicSliderUI
protected int getThumbOverhang()
protected int getTrackWidth()
protected int getTickLength()
getTickLength
in class BasicSliderUI
public void paintTicks(Graphics g)
paintTicks
in class BasicSliderUI
protected void calculateTickRect()
calculateTickRect
in class BasicSliderUI
protected void calculateLabelRect()
calculateLabelRect
in class BasicSliderUI
protected void calculateThumbLocation()
calculateThumbLocation
in class BasicSliderUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class BasicSliderUI
public void setThumbLocation(int x, int y)
setThumbLocation
in class BasicSliderUI
public Dimension getPreferredHorizontalSize()
getPreferredHorizontalSize
in class BasicSliderUI
public Dimension getPreferredVerticalSize()
getPreferredVerticalSize
in class BasicSliderUI