Package com.formdev.flatlaf.ui
Class FlatSliderUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.SliderUI
javax.swing.plaf.basic.BasicSliderUI
com.formdev.flatlaf.ui.FlatSliderUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate for
JSlider
.
-
Nested Class Summary
Nested ClassesNested 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 TypeFieldDescriptionprivate Color
private Color
protected Color
protected Color
protected Color
protected Color
protected Color
protected Color
protected int
protected Color
private Object[]
protected Color
protected Color
protected float
protected Color
protected boolean
protected boolean
protected Dimension
protected Color
protected Color
protected Color
protected int
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 void
applyStyle
(Object style) protected Object
applyStyleProperty
(String key, Object value) static Dimension
calcThumbSize
(JSlider slider, Dimension thumbSize, int focusWidth) static Shape
createDirectionalThumbShape
(float x, float y, float w, float h, float arc) protected FocusListener
createFocusListener
(JSlider slider) protected PropertyChangeListener
createPropertyChangeListener
(JSlider slider) static Shape
createRoundThumbShape
(float x, float y, float w, float h) protected BasicSliderUI.TrackListener
createTrackListener
(JSlider slider) static ComponentUI
int
getBaseline
(JComponent c, int width, int height) getStyleableValue
(JComponent c, String key) protected Color
protected Dimension
protected int
protected Color
protected Color
protected void
installDefaults
(JSlider slider) protected void
void
protected boolean
void
paint
(Graphics g, JComponent c) void
void
void
static void
paintThumb
(Graphics g, JSlider slider, Rectangle thumbRect, boolean roundThumb, Color thumbColor, Color thumbBorderColor, Color focusedColor, float thumbBorderWidth, int focusWidth) private static void
paintThumbImpl
(Graphics g, JSlider slider, int x, int y, int width, int height, boolean roundThumb, Color thumbColor, Color thumbBorderColor, Color focusedColor, float thumbBorderWidth, float focusWidth) void
void
void
setThumbLocation
(int x, int y) static Color
stateColor
(JSlider slider, boolean hover, boolean pressed, Color enabledColor, Color disabledColor, Color focusedColor, Color hoverColor, Color pressedColor) protected void
uninstallDefaults
(JSlider slider) Methods inherited from class javax.swing.plaf.basic.BasicSliderUI
calculateContentRect, calculateFocusRect, calculateGeometry, calculateLabelRect, calculateThumbLocation, calculateThumbSize, calculateTickRect, calculateTrackBuffer, calculateTrackRect, createChangeListener, createComponentListener, createScrollListener, drawInverted, getBaselineResizeBehavior, getFocusColor, getHeightOfHighValueLabel, getHeightOfLowValueLabel, getHeightOfTallestLabel, getHighestValue, getHighestValueLabel, getHighlightColor, getLowestValue, getLowestValueLabel, getMaximumSize, getMinimumSize, getPreferredSize, getShadowColor, getWidthOfHighValueLabel, getWidthOfLowValueLabel, getWidthOfWidestLabel, installKeyboardActions, installListeners, isDragging, labelsHaveSameBaselines, paintHorizontalLabel, paintMajorTickForHorizSlider, paintMajorTickForVertSlider, paintMinorTickForHorizSlider, paintMinorTickForVertSlider, paintVerticalLabel, recalculateIfInsetsChanged, recalculateIfOrientationChanged, scrollByBlock, scrollByUnit, scrollDueToClickInTrack, uninstallKeyboardActions, uninstallListeners, uninstallUI, valueForXPosition, valueForYPosition, xPositionForValue, yPositionForValue, yPositionForValue
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
Field Details
-
trackWidth
protected int trackWidth -
thumbSize
-
focusWidth
protected int focusWidth -
thumbBorderWidth
protected float thumbBorderWidth- Since:
- 2
-
trackValueColor
-
trackColor
-
thumbColor
-
thumbBorderColor
-
focusBaseColor
-
focusedColor
-
focusedThumbBorderColor
-
hoverThumbColor
-
pressedThumbColor
-
disabledTrackColor
-
disabledThumbColor
-
disabledThumbBorderColor
-
tickColor
-
defaultBackground
-
defaultForeground
-
thumbHover
protected boolean thumbHover -
thumbPressed
protected boolean thumbPressed -
oldRenderingHints
-
oldStyleValues
-
-
Constructor Details
-
FlatSliderUI
public FlatSliderUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classBasicSliderUI
-
installDefaults
- Overrides:
installDefaults
in classBasicSliderUI
-
uninstallDefaults
- Overrides:
uninstallDefaults
in classBasicSliderUI
-
createTrackListener
- Overrides:
createTrackListener
in classBasicSliderUI
-
createFocusListener
- Overrides:
createFocusListener
in classBasicSliderUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListener
in classBasicSliderUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
getBaseline
- Overrides:
getBaseline
in classBasicSliderUI
-
getPreferredHorizontalSize
- Overrides:
getPreferredHorizontalSize
in classBasicSliderUI
-
getPreferredVerticalSize
- Overrides:
getPreferredVerticalSize
in classBasicSliderUI
-
getMinimumHorizontalSize
- Overrides:
getMinimumHorizontalSize
in classBasicSliderUI
-
getMinimumVerticalSize
- Overrides:
getMinimumVerticalSize
in classBasicSliderUI
-
getTickLength
protected int getTickLength()- Overrides:
getTickLength
in classBasicSliderUI
-
getThumbSize
- Overrides:
getThumbSize
in classBasicSliderUI
-
calcThumbSize
-
paint
- Overrides:
paint
in classBasicSliderUI
-
paintLabels
- Overrides:
paintLabels
in classBasicSliderUI
-
paintFocus
- Overrides:
paintFocus
in classBasicSliderUI
-
paintTrack
- Overrides:
paintTrack
in classBasicSliderUI
-
paintTicks
- Overrides:
paintTicks
in classBasicSliderUI
-
paintThumb
- Overrides:
paintThumb
in classBasicSliderUI
-
paintThumb
-
paintThumbImpl
-
createRoundThumbShape
-
createDirectionalThumbShape
-
getTrackValueColor
-
getTrackColor
-
getThumbColor
-
stateColor
-
isRoundThumb
protected boolean isRoundThumb() -
setThumbLocation
public void setThumbLocation(int x, int y) - Overrides:
setThumbLocation
in classBasicSliderUI
-