Class RadianceScrollBarUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ScrollBarUI
javax.swing.plaf.basic.BasicScrollBarUI
org.pushingpixels.radiance.theming.internal.ui.RadianceScrollBarUI
- All Implemented Interfaces:
LayoutManager
,SwingConstants
,TransitionAwareUI
UI for scroll bars in Radiance look and feel.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Track mouse drags.Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StateTransitionTracker
private BladeColorScheme
private BladeColorScheme
private AdjustmentListener
Listener on adjustments made to the scrollbar model.private PropertyChangeListener
Property change listener.private RolloverControlListener
Listener for thumb transition animations.private int
Scroll bar width.private Set
<RadianceThemingWidget<JComponent>> private static int
private ButtonModel
Surrogate button model for tracking the thumb transitions.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, 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected BasicScrollBarUI.ArrowButtonListener
protected JButton
createDecreaseButton
(int orientation) protected JButton
createIncreaseButton
(int orientation) protected BasicScrollBarUI.TrackListener
static ComponentUI
createUI
(JComponent comp) private void
drawThumbHorizontal
(Graphics2D g, Rectangle thumbBounds) private void
drawThumbVertical
(Graphics2D g, Rectangle thumbBounds) Returns the model for tracking the transitions.protected void
protected void
protected void
void
boolean
isInside
(MouseEvent me) Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.protected void
protected void
protected void
protected void
void
paint
(Graphics g, JComponent c) protected void
paintThumb
(Graphics g, JComponent c, Rectangle thumbBounds) protected void
paintTrack
(Graphics g, JComponent c, Rectangle trackBounds) void
scrollByBlock
(int direction) protected void
protected void
protected void
void
void
update
(Graphics g, JComponent c) private void
updateThumbState
(int x, int y) Updates the thumb state based on the coordinates.Methods inherited from class javax.swing.plaf.basic.BasicScrollBarUI
addLayoutComponent, configureScrollBarColors, createModelListener, createPropertyChangeListener, createScrollListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installKeyboardActions, isThumbRollover, layoutContainer, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByUnit, setThumbBounds, setThumbRollover, uninstallKeyboardActions
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize
-
Field Details
-
thumbModel
Surrogate button model for tracking the thumb transitions. -
mutableFillColorScheme
-
mutableBorderColorScheme
-
radianceThumbRolloverListener
Listener for thumb transition animations. -
compositeStateTransitionTracker
-
radiancePropertyListener
Property change listener. -
scrollBarWidth
private int scrollBarWidthScroll bar width. -
radianceAdjustmentListener
Listener on adjustments made to the scrollbar model. -
themingWidgets
-
THUMB_DELTA
private static int THUMB_DELTA
-
-
Constructor Details
-
RadianceScrollBarUI
Simple constructor.- Parameters:
b
- Associated component.
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classBasicScrollBarUI
-
uninstallUI
- Overrides:
uninstallUI
in classBasicScrollBarUI
-
createDecreaseButton
- Overrides:
createDecreaseButton
in classBasicScrollBarUI
-
createIncreaseButton
- Overrides:
createIncreaseButton
in classBasicScrollBarUI
-
drawThumbVertical
-
drawThumbHorizontal
-
paintTrack
- Overrides:
paintTrack
in classBasicScrollBarUI
-
paintThumb
- Overrides:
paintThumb
in classBasicScrollBarUI
-
paint
- Overrides:
paint
in classBasicScrollBarUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicScrollBarUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classBasicScrollBarUI
-
installComponents
protected void installComponents()- Overrides:
installComponents
in classBasicScrollBarUI
-
uninstallComponents
protected void uninstallComponents()- Overrides:
uninstallComponents
in classBasicScrollBarUI
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classBasicScrollBarUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicScrollBarUI
-
isInside
Description copied from interface:TransitionAwareUI
Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.- Specified by:
isInside
in interfaceTransitionAwareUI
- Parameters:
me
- Mouse event.- Returns:
true
if the mouse position of the specified event lies inside the area of the component designated for transition effects,false
otherwise.
-
getTransitionTracker
Description copied from interface:TransitionAwareUI
Returns the model for tracking the transitions.- Specified by:
getTransitionTracker
in interfaceTransitionAwareUI
- Returns:
- Model for tracking the transitions.
-
scrollByBlock
public void scrollByBlock(int direction) - Overrides:
scrollByBlock
in classBasicScrollBarUI
-
layoutVScrollbar
- Overrides:
layoutVScrollbar
in classBasicScrollBarUI
-
layoutHScrollbar
- Overrides:
layoutHScrollbar
in classBasicScrollBarUI
-
layoutVScrollbarNone
-
layoutHScrollbarNone
-
createTrackListener
- Overrides:
createTrackListener
in classBasicScrollBarUI
-
createArrowButtonListener
- Overrides:
createArrowButtonListener
in classBasicScrollBarUI
-
updateThumbState
private void updateThumbState(int x, int y) Updates the thumb state based on the coordinates.- Parameters:
x
- X coordinate.y
- Y coordinate.
-
getPreferredSize
- Overrides:
getPreferredSize
in classBasicScrollBarUI
-
update
- Overrides:
update
in classComponentUI
-