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 classTrack mouse drags.Nested classes/interfaces inherited from class BasicScrollBarUI
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StateTransitionTrackerprivate BladeContainerColorTokensprivate AdjustmentListenerListener on adjustments made to the scrollbar model.private PropertyChangeListenerProperty change listener.private RolloverControlListenerListener for thumb transition animations.private intScroll bar width.private Set<RadianceThemingWidget<JComponent>> private static intprivate ButtonModelSurrogate button model for tracking the thumb transitions.Fields inherited from class 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, 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 BasicScrollBarUI.ArrowButtonListenerprotected JButtoncreateDecreaseButton(int orientation) protected JButtoncreateIncreaseButton(int orientation) protected BasicScrollBarUI.TrackListenerstatic ComponentUIcreateUI(JComponent comp) private voiddrawThumbHorizontal(Graphics2D g, Rectangle thumbBounds) private voiddrawThumbVertical(Graphics2D g, Rectangle thumbBounds) Returns the model for tracking the transitions.protected voidprotected voidprotected voidvoidbooleanisInside(MouseEvent me) Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.protected voidprotected voidprotected voidprotected voidvoidpaint(Graphics g, JComponent c) protected voidpaintThumb(Graphics g, JComponent c, Rectangle thumbBounds) protected voidpaintTrack(Graphics g, JComponent c, Rectangle trackBounds) voidscrollByBlock(int direction) protected voidprotected voidprotected voidvoidvoidupdate(Graphics g, JComponent c) private voidupdateThumbState(int x, int y) Updates the thumb state based on the coordinates.Methods inherited from class BasicScrollBarUI
addLayoutComponent, configureScrollBarColors, createModelListener, createPropertyChangeListener, createScrollListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installKeyboardActions, isThumbRollover, layoutContainer, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByUnit, setThumbBounds, setThumbRollover, uninstallKeyboardActionsMethods inherited from class ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize
-
Field Details
-
thumbModel
Surrogate button model for tracking the thumb transitions. -
mutableContainerTokens
-
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:
installUIin classBasicScrollBarUI
-
uninstallUI
- Overrides:
uninstallUIin classBasicScrollBarUI
-
createDecreaseButton
- Overrides:
createDecreaseButtonin classBasicScrollBarUI
-
createIncreaseButton
- Overrides:
createIncreaseButtonin classBasicScrollBarUI
-
drawThumbVertical
-
drawThumbHorizontal
-
paintTrack
- Overrides:
paintTrackin classBasicScrollBarUI
-
paintThumb
- Overrides:
paintThumbin classBasicScrollBarUI
-
paint
- Overrides:
paintin classBasicScrollBarUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classBasicScrollBarUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classBasicScrollBarUI
-
installComponents
protected void installComponents()- Overrides:
installComponentsin classBasicScrollBarUI
-
uninstallComponents
protected void uninstallComponents()- Overrides:
uninstallComponentsin classBasicScrollBarUI
-
installListeners
protected void installListeners()- Overrides:
installListenersin classBasicScrollBarUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin classBasicScrollBarUI
-
isInside
Description copied from interface:TransitionAwareUIChecks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.- Specified by:
isInsidein interfaceTransitionAwareUI- Parameters:
me- Mouse event.- Returns:
trueif the mouse position of the specified event lies inside the area of the component designated for transition effects,falseotherwise.
-
getTransitionTracker
Description copied from interface:TransitionAwareUIReturns the model for tracking the transitions.- Specified by:
getTransitionTrackerin interfaceTransitionAwareUI- Returns:
- Model for tracking the transitions.
-
scrollByBlock
public void scrollByBlock(int direction) - Overrides:
scrollByBlockin classBasicScrollBarUI
-
layoutVScrollbar
- Overrides:
layoutVScrollbarin classBasicScrollBarUI
-
layoutHScrollbar
- Overrides:
layoutHScrollbarin classBasicScrollBarUI
-
layoutVScrollbarNone
-
layoutHScrollbarNone
-
createTrackListener
- Overrides:
createTrackListenerin classBasicScrollBarUI
-
createArrowButtonListener
- Overrides:
createArrowButtonListenerin 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:
getPreferredSizein classBasicScrollBarUI
-
update
- Overrides:
updatein classComponentUI
-