Class CustomScrollBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ScrollBarUI
-
- javax.swing.plaf.basic.BasicScrollBarUI
-
- net.runelite.client.ui.components.CustomScrollBarUI
-
- All Implemented Interfaces:
LayoutManager
,SwingConstants
public class CustomScrollBarUI extends BasicScrollBarUI
This scroll bar UI is to be used for the "RuneLite Obsidian" client theme. It is a part of the client's redesign as detailed on issue #1342
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
-
-
Field Summary
-
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, thumbDarkShadowColor, thumbHighlightColor, thumbLightShadowColor, thumbRect, 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 CustomScrollBarUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JButton
createDecreaseButton(int orientation)
Applies an empty button to the decrease (down arrow) button.protected JButton
createEmptyButton()
Creates an empty JButton to be used as the scroll bar's arrows (to disable the arrows).protected JButton
createIncreaseButton(int orientation)
Applies an empty button to the increase (up arrow) button.static ComponentUI
createUI(JComponent c)
protected void
paintThumb(Graphics graphics, JComponent jComponent, Rectangle rectangle)
Overrides the painting of the bar's thumb (the lighter part on top that users use to slide up and down the page).protected void
paintTrack(Graphics graphics, JComponent jComponent, Rectangle rectangle)
Overrides the painting of the bar's track (the darker part underneath that extends the full page length).void
setThumbColor(Color thumbColor)
void
setTrackColor(Color trackColor)
-
Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, configureScrollBarColors, createArrowButtonListener, createModelListener, createPropertyChangeListener, createScrollListener, createTrackListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getPreferredSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paint, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbBounds, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, update
-
-
-
-
Method Detail
-
paintTrack
protected void paintTrack(Graphics graphics, JComponent jComponent, Rectangle rectangle)
Overrides the painting of the bar's track (the darker part underneath that extends the full page length).- Overrides:
paintTrack
in classBasicScrollBarUI
-
paintThumb
protected void paintThumb(Graphics graphics, JComponent jComponent, Rectangle rectangle)
Overrides the painting of the bar's thumb (the lighter part on top that users use to slide up and down the page).- Overrides:
paintThumb
in classBasicScrollBarUI
-
createEmptyButton
protected JButton createEmptyButton()
Creates an empty JButton to be used as the scroll bar's arrows (to disable the arrows).
-
createUI
public static ComponentUI createUI(JComponent c)
-
createDecreaseButton
protected JButton createDecreaseButton(int orientation)
Applies an empty button to the decrease (down arrow) button.- Overrides:
createDecreaseButton
in classBasicScrollBarUI
-
createIncreaseButton
protected JButton createIncreaseButton(int orientation)
Applies an empty button to the increase (up arrow) button.- Overrides:
createIncreaseButton
in classBasicScrollBarUI
-
setThumbColor
public void setThumbColor(Color thumbColor)
-
setTrackColor
public void setTrackColor(Color trackColor)
-
-