Class DarkScrollBarUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ScrollBarUI
javax.swing.plaf.basic.BasicScrollBarUI
ch.autumo.ui.fx.view.DarkScrollBarUI
- All Implemented Interfaces:
LayoutManager, SwingConstants
Dark Scrollbar UI for the embedded Swing editor widgets (RSyntaxTextArea).
Swing uses the current look & feel for scrollbars and, embedded in JavaFX, that is the
light Metal look - which clashes with the dark editor theme (cfg/edit.xml).
This UI paints a dark track and a flat grey thumb and hides the arrow buttons, as a modern
code editor does. It is applied by DefaultCodeEditorView.createScrollPane(RSyntaxTextArea) to both
scrollbars of the editor's RTextScrollPane.
The colours match the editor theme: track = editor background, thumb = a grey derived from the gutter divider.
-
Nested Class Summary
Nested classes/interfaces inherited from class BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener -
Field Summary
Fields inherited from class 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, trackRectFields inherited from interface 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected JButtoncreateDecreaseButton(int orientation) protected JButtoncreateIncreaseButton(int orientation) voidvoidpaint(Graphics g, JComponent c) protected voidpaintThumb(Graphics g, JComponent c, Rectangle thumbBounds) protected voidpaintTrack(Graphics g, JComponent c, Rectangle trackBounds) Methods inherited from class BasicScrollBarUI
addLayoutComponent, createArrowButtonListener, createModelListener, createPropertyChangeListener, createScrollListener, createTrackListener, createUI, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getPreferredSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installComponents, installKeyboardActions, installListeners, installUI, isThumbRollover, layoutContainer, layoutHScrollbar, layoutVScrollbar, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByBlock, scrollByUnit, setThumbBounds, setThumbRollover, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, update
-
Constructor Details
-
DarkScrollBarUI
public DarkScrollBarUI()Default constructor; the UI has no configurable state.
-
-
Method Details
-
configureScrollBarColors
protected void configureScrollBarColors()- Overrides:
configureScrollBarColorsin classBasicScrollBarUI
-
createDecreaseButton
- Overrides:
createDecreaseButtonin classBasicScrollBarUI
-
createIncreaseButton
- Overrides:
createIncreaseButtonin classBasicScrollBarUI
-
installDefaults
public void installDefaults()- Overrides:
installDefaultsin classBasicScrollBarUI
-
paint
- Overrides:
paintin classBasicScrollBarUI
-
paintTrack
- Overrides:
paintTrackin classBasicScrollBarUI
-
paintThumb
- Overrides:
paintThumbin classBasicScrollBarUI
-