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 BasicSliderUI
BasicSliderUI.ActionScroller, BasicSliderUI.ChangeHandler, BasicSliderUI.ComponentHandler, BasicSliderUI.FocusHandler, BasicSliderUI.PropertyChangeHandler, BasicSliderUI.ScrollListener, BasicSliderUI.TrackListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Colorprivate Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected Colorprotected intprotected Colorprivate Object[]protected Colorprotected Colorprotected floatprotected Colorprotected booleanprotected booleanprotected Dimensionprotected Colorprotected Colorprotected Colorprotected intFields inherited from class 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 voidapplyStyle(Object style) protected ObjectapplyStyleProperty(String key, Object value) static DimensioncalcThumbSize(JSlider slider, Dimension thumbSize, int focusWidth) static ShapecreateDirectionalThumbShape(float x, float y, float w, float h, float arc) protected FocusListenercreateFocusListener(JSlider slider) protected PropertyChangeListenercreatePropertyChangeListener(JSlider slider) static ShapecreateRoundThumbShape(float x, float y, float w, float h) protected BasicSliderUI.TrackListenercreateTrackListener(JSlider slider) static ComponentUIintgetBaseline(JComponent c, int width, int height) getStyleableValue(JComponent c, String key) protected Colorprotected Dimensionprotected intprotected Colorprotected Colorprotected voidinstallDefaults(JSlider slider) protected voidvoidprotected booleanvoidpaint(Graphics g, JComponent c) voidvoidvoidstatic voidpaintThumb(Graphics g, JSlider slider, Rectangle thumbRect, boolean roundThumb, Color thumbColor, Color thumbBorderColor, Color focusedColor, float thumbBorderWidth, int focusWidth) private static voidpaintThumbImpl(Graphics g, JSlider slider, int x, int y, int width, int height, boolean roundThumb, Color thumbColor, Color thumbBorderColor, Color focusedColor, float thumbBorderWidth, float focusWidth) voidvoidvoidsetThumbLocation(int x, int y) static ColorstateColor(JSlider slider, boolean hover, boolean pressed, Color enabledColor, Color disabledColor, Color focusedColor, Color hoverColor, Color pressedColor) protected voiduninstallDefaults(JSlider slider) Methods inherited from class 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, yPositionForValueMethods inherited from class 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:
installUIin classBasicSliderUI
-
installDefaults
- Overrides:
installDefaultsin classBasicSliderUI
-
uninstallDefaults
- Overrides:
uninstallDefaultsin classBasicSliderUI
-
createTrackListener
- Overrides:
createTrackListenerin classBasicSliderUI
-
createFocusListener
- Overrides:
createFocusListenerin classBasicSliderUI
-
createPropertyChangeListener
- Overrides:
createPropertyChangeListenerin classBasicSliderUI
-
installStyle
protected void installStyle()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
getBaseline
- Overrides:
getBaselinein classBasicSliderUI
-
getPreferredHorizontalSize
- Overrides:
getPreferredHorizontalSizein classBasicSliderUI
-
getPreferredVerticalSize
- Overrides:
getPreferredVerticalSizein classBasicSliderUI
-
getMinimumHorizontalSize
- Overrides:
getMinimumHorizontalSizein classBasicSliderUI
-
getMinimumVerticalSize
- Overrides:
getMinimumVerticalSizein classBasicSliderUI
-
getTickLength
protected int getTickLength()- Overrides:
getTickLengthin classBasicSliderUI
-
getThumbSize
- Overrides:
getThumbSizein classBasicSliderUI
-
calcThumbSize
-
paint
- Overrides:
paintin classBasicSliderUI
-
paintLabels
- Overrides:
paintLabelsin classBasicSliderUI
-
paintFocus
- Overrides:
paintFocusin classBasicSliderUI
-
paintTrack
- Overrides:
paintTrackin classBasicSliderUI
-
paintTicks
- Overrides:
paintTicksin classBasicSliderUI
-
paintThumb
- Overrides:
paintThumbin classBasicSliderUI
-
paintThumb
-
paintThumbImpl
-
createRoundThumbShape
-
createDirectionalThumbShape
-
getTrackValueColor
-
getTrackColor
-
getThumbColor
-
stateColor
-
isRoundThumb
protected boolean isRoundThumb() -
setThumbLocation
public void setThumbLocation(int x, int y) - Overrides:
setThumbLocationin classBasicSliderUI
-