Package com.formdev.flatlaf.ui
Class FlatScrollBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ScrollBarUI
-
- javax.swing.plaf.basic.BasicScrollBarUI
-
- com.formdev.flatlaf.ui.FlatScrollBarUI
-
- All Implemented Interfaces:
FlatStylingSupport.StyleableLookupProvider,FlatStylingSupport.StyleableUI,LayoutManager,SwingConstants
public class FlatScrollBarUI extends BasicScrollBarUI implements FlatStylingSupport.StyleableUI, FlatStylingSupport.StyleableLookupProvider
Provides the Flat LaF UI delegate forJScrollBar.- UiDefault:
- ScrollBar.background Color, ScrollBar.foreground Color unused, ScrollBar.track Color, ScrollBar.thumb Color, ScrollBar.width int, ScrollBar.minimumThumbSize Dimension, ScrollBar.maximumThumbSize Dimension, ScrollBar.allowsAbsolutePositioning boolean , ScrollBar.minimumButtonSize Dimension, ScrollBar.trackInsets Insets, ScrollBar.thumbInsets Insets, ScrollBar.trackArc int, ScrollBar.thumbArc int, ScrollBar.hoverTrackColor Color optional, ScrollBar.hoverThumbColor Color optional, ScrollBar.hoverThumbWithTrack boolean, ScrollBar.pressedTrackColor Color optional, ScrollBar.pressedThumbColor Color optional, ScrollBar.pressedThumbWithTrack boolean, Component.arrowType String chevron (default) or triangle, ScrollBar.showButtons boolean, ScrollBar.buttonArrowColor Color, ScrollBar.buttonDisabledArrowColor Color, ScrollBar.hoverButtonBackground Color optional, ScrollBar.pressedButtonBackground Color optional
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classFlatScrollBarUI.FlatScrollBarButton-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanallowsAbsolutePositioningprotected StringarrowTypeprotected ColorbuttonArrowColorprotected ColorbuttonDisabledArrowColorprotected ColorhoverButtonBackgroundprotected booleanhoverThumbprotected ColorhoverThumbColorprotected booleanhoverThumbWithTrackprotected booleanhoverTrackprotected ColorhoverTrackColorprotected DimensionminimumButtonSizeprotected ColorpressedButtonBackgroundprotected ColorpressedThumbColorprotected booleanpressedThumbWithTrackprotected ColorpressedTrackColorprotected booleanshowButtonsprotected intthumbArcprotected InsetsthumbInsetsprotected inttrackArcprotected InsetstrackInsets-
Fields inherited from class javax.swing.plaf.basic.BasicScrollBarUI
buttonListener, decrButton, DECREASE_HIGHLIGHT, decrGap, incrButton, INCREASE_HIGHLIGHT, incrGap, isDragging, maximumThumbSize, minimumThumbSize, modelListener, NO_HIGHLIGHT, propertyChangeListener, scrollbar, scrollBarWidth, scrollListener, scrollTimer, thumbColor, thumbDarkShadowColor, thumbHighlightColor, thumbLightShadowColor, thumbRect, trackColor, trackHighlight, trackHighlightColor, trackListener, trackRect
-
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
-
Constructor Summary
Constructors Constructor Description FlatScrollBarUI()
-
Method Summary
-
Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, configureScrollBarColors, createArrowButtonListener, createModelListener, createScrollListener, createTrackListener, getMaximumSize, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbBounds, setThumbRollover, uninstallComponents, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, update
-
-
-
-
Field Detail
-
allowsAbsolutePositioning
protected boolean allowsAbsolutePositioning
-
minimumButtonSize
protected Dimension minimumButtonSize
- Since:
- 2.1
-
trackInsets
protected Insets trackInsets
-
thumbInsets
protected Insets thumbInsets
-
trackArc
protected int trackArc
-
thumbArc
protected int thumbArc
-
hoverTrackColor
protected Color hoverTrackColor
-
hoverThumbColor
protected Color hoverThumbColor
-
hoverThumbWithTrack
protected boolean hoverThumbWithTrack
-
pressedTrackColor
protected Color pressedTrackColor
-
pressedThumbColor
protected Color pressedThumbColor
-
pressedThumbWithTrack
protected boolean pressedThumbWithTrack
-
showButtons
protected boolean showButtons
-
arrowType
protected String arrowType
-
buttonArrowColor
protected Color buttonArrowColor
-
buttonDisabledArrowColor
protected Color buttonDisabledArrowColor
-
hoverButtonBackground
protected Color hoverButtonBackground
-
pressedButtonBackground
protected Color pressedButtonBackground
-
hoverTrack
protected boolean hoverTrack
-
hoverThumb
protected boolean hoverThumb
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUIin classBasicScrollBarUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicScrollBarUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classBasicScrollBarUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicScrollBarUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classBasicScrollBarUI
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
- Overrides:
createPropertyChangeListenerin classBasicScrollBarUI
-
installStyle
protected void installStyle()
- Since:
- 2
-
applyStyle
protected void applyStyle(Object style)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
getLookupForStyling
public MethodHandles.Lookup getLookupForStyling()
- Specified by:
getLookupForStylingin interfaceFlatStylingSupport.StyleableLookupProvider- Since:
- 2.5
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSizein classBasicScrollBarUI
-
createDecreaseButton
protected JButton createDecreaseButton(int orientation)
- Overrides:
createDecreaseButtonin classBasicScrollBarUI
-
createIncreaseButton
protected JButton createIncreaseButton(int orientation)
- Overrides:
createIncreaseButtonin classBasicScrollBarUI
-
isShowButtons
protected boolean isShowButtons()
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classBasicScrollBarUI
-
paintTrack
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
- Overrides:
paintTrackin classBasicScrollBarUI
-
paintThumb
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
- Overrides:
paintThumbin classBasicScrollBarUI
-
paintTrackOrThumb
protected void paintTrackOrThumb(Graphics g, JComponent c, Rectangle bounds, Insets insets, int arc)
-
paintDecreaseHighlight
protected void paintDecreaseHighlight(Graphics g)
- Overrides:
paintDecreaseHighlightin classBasicScrollBarUI
-
paintIncreaseHighlight
protected void paintIncreaseHighlight(Graphics g)
- Overrides:
paintIncreaseHighlightin classBasicScrollBarUI
-
getTrackColor
protected Color getTrackColor(JComponent c, boolean hover, boolean pressed)
-
getThumbColor
protected Color getThumbColor(JComponent c, boolean hover, boolean pressed)
-
getMinimumThumbSize
protected Dimension getMinimumThumbSize()
- Overrides:
getMinimumThumbSizein classBasicScrollBarUI
-
getMaximumThumbSize
protected Dimension getMaximumThumbSize()
- Overrides:
getMaximumThumbSizein classBasicScrollBarUI
-
getSupportsAbsolutePositioning
public boolean getSupportsAbsolutePositioning()
- Overrides:
getSupportsAbsolutePositioningin classBasicScrollBarUI
-
-