LayoutManager
, SwingConstants
, TransitionAwareUI
public class SubstanceScrollBarUI extends BasicScrollBarUI implements TransitionAwareUI
Modifier and Type | Class | Description |
---|---|---|
protected class |
SubstanceScrollBarUI.SubstanceArrowButtonListener |
Listener on arrow buttons.
|
protected class |
SubstanceScrollBarUI.SubstanceTrackListener |
Track mouse drags.
|
BasicScrollBarUI.ArrowButtonListener, BasicScrollBarUI.ModelListener, BasicScrollBarUI.PropertyChangeHandler, BasicScrollBarUI.ScrollListener, BasicScrollBarUI.TrackListener
Modifier and Type | Field | Description |
---|---|---|
protected org.pushingpixels.substance.internal.ui.SubstanceScrollBarUI.CompositeButtonModel |
compositeScrollTrackModel |
Surrogate model to sync between rollover effects of scroll buttons and
scroll track / scroll thumb.
|
protected StateTransitionTracker |
compositeStateTransitionTracker |
|
protected JButton |
mySecondDecreaseButton |
The second decrease button.
|
protected JButton |
mySecondIncreaseButton |
The second increase button.
|
protected int |
scrollBarWidth |
Scroll bar width.
|
protected AdjustmentListener |
substanceAdjustmentListener |
Listener on adjustments made to the scrollbar model - this is for
repaiting both scrollbars with the viewport.
|
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
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Modifier | Constructor | Description |
---|---|---|
protected |
SubstanceScrollBarUI(JComponent b) |
Simple constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected BasicScrollBarUI.ArrowButtonListener |
createArrowButtonListener() |
|
protected JButton |
createDecreaseButton(int orientation) |
|
protected JButton |
createGeneralDecreaseButton(int orientation,
boolean isRegular) |
Creates a decrease button.
|
protected JButton |
createGeneralIncreaseButton(int orientation,
boolean isRegular) |
Creates a increase button.
|
protected JButton |
createIncreaseButton(int orientation) |
|
protected BasicScrollBarUI.TrackListener |
createTrackListener() |
|
static ComponentUI |
createUI(JComponent comp) |
|
static String |
getMemoryUsage() |
Returns the memory usage string.
|
Dimension |
getPreferredSize(JComponent c) |
|
protected ComponentState |
getState(JButton scrollButton) |
Returns the scroll button state.
|
StateTransitionTracker |
getTransitionTracker() |
Returns the model for tracking the transitions.
|
protected void |
installComponents() |
|
protected void |
installDefaults() |
|
protected void |
installListeners() |
|
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 |
layoutHScrollbar(JScrollBar sb) |
|
protected void |
layoutHScrollbarAdjacent(JScrollBar sb) |
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT . |
protected void |
layoutHScrollbarMultiple(JScrollBar sb) |
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE . |
protected void |
layoutHScrollbarMultipleBoth(JScrollBar sb) |
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE . |
protected void |
layoutHScrollbarNone(JScrollBar sb) |
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.NONE . |
protected void |
layoutVScrollbar(JScrollBar sb) |
|
protected void |
layoutVScrollbarAdjacent(JScrollBar sb) |
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT . |
protected void |
layoutVScrollbarMultiple(JScrollBar sb) |
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE . |
protected void |
layoutVScrollbarMultipleBoth(JScrollBar sb) |
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH . |
protected void |
layoutVScrollbarNone(JScrollBar sb) |
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT . |
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) |
|
void |
scrollByUnits(int direction,
int units) |
Scrolls the associated scroll bar.
|
protected void |
uninstallComponents() |
|
protected void |
uninstallListeners() |
addLayoutComponent, configureScrollBarColors, createModelListener, createPropertyChangeListener, createScrollListener, getMaximumSize, getMaximumThumbSize, getMinimumThumbSize, getSupportsAbsolutePositioning, getThumbBounds, getTrackBounds, installKeyboardActions, installUI, isThumbRollover, layoutContainer, minimumLayoutSize, paintDecreaseHighlight, paintIncreaseHighlight, preferredLayoutSize, removeLayoutComponent, scrollByUnit, setThumbBounds, setThumbRollover, uninstallDefaults, uninstallKeyboardActions, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, update
protected JButton mySecondDecreaseButton
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT
,
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE
and
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH
modes.protected JButton mySecondIncreaseButton
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH
mode.protected StateTransitionTracker compositeStateTransitionTracker
protected int scrollBarWidth
protected AdjustmentListener substanceAdjustmentListener
protected org.pushingpixels.substance.internal.ui.SubstanceScrollBarUI.CompositeButtonModel compositeScrollTrackModel
protected SubstanceScrollBarUI(JComponent b)
b
- Associated component.public static ComponentUI createUI(JComponent comp)
protected JButton createGeneralDecreaseButton(int orientation, boolean isRegular)
orientation
- Button orientation.isRegular
- if true
, the regular (upper / left) decrease
button is created, if false
, the additional
(lower / right) decrease button is created for
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT
,
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE
and
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH
kinds.protected JButton createDecreaseButton(int orientation)
createDecreaseButton
in class BasicScrollBarUI
protected JButton createIncreaseButton(int orientation)
createIncreaseButton
in class BasicScrollBarUI
protected JButton createGeneralIncreaseButton(int orientation, boolean isRegular)
orientation
- Button orientation.isRegular
- if true
, the regular (lower / right) increase
button is created, if false
, the additional
(upper / left) increase button is created for
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH
kind.protected ComponentState getState(JButton scrollButton)
scrollButton
- Scroll button.protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
paintTrack
in class BasicScrollBarUI
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
paintThumb
in class BasicScrollBarUI
public void paint(Graphics g, JComponent c)
paint
in class BasicScrollBarUI
protected void installDefaults()
installDefaults
in class BasicScrollBarUI
protected void installComponents()
installComponents
in class BasicScrollBarUI
protected void uninstallComponents()
uninstallComponents
in class BasicScrollBarUI
protected void installListeners()
installListeners
in class BasicScrollBarUI
protected void uninstallListeners()
uninstallListeners
in class BasicScrollBarUI
public boolean isInside(MouseEvent me)
TransitionAwareUI
isInside
in interface TransitionAwareUI
me
- Mouse event.true
if the mouse position of the specified event
lies inside the area of the component designated for transition
effects, false
otherwise.public StateTransitionTracker getTransitionTracker()
TransitionAwareUI
getTransitionTracker
in interface TransitionAwareUI
public void scrollByBlock(int direction)
scrollByBlock
in class BasicScrollBarUI
public void scrollByUnits(int direction, int units)
direction
- Direction.units
- Scroll units.protected void layoutVScrollbar(JScrollBar sb)
layoutVScrollbar
in class BasicScrollBarUI
protected void layoutHScrollbar(JScrollBar sb)
layoutHScrollbar
in class BasicScrollBarUI
protected void layoutVScrollbarAdjacent(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT
.sb
- Scroll bar.protected void layoutVScrollbarNone(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT
.sb
- Scroll bar.protected void layoutVScrollbarMultiple(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE
.sb
- Scroll bar.protected void layoutVScrollbarMultipleBoth(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH
.sb
- Scroll bar.protected void layoutHScrollbarAdjacent(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT
.sb
- Scroll bar.protected void layoutHScrollbarNone(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.NONE
.sb
- Scroll bar.protected void layoutHScrollbarMultiple(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE
.sb
- Scroll bar.protected void layoutHScrollbarMultipleBoth(JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE
.sb
- Scroll bar.public static String getMemoryUsage()
protected BasicScrollBarUI.TrackListener createTrackListener()
createTrackListener
in class BasicScrollBarUI
protected BasicScrollBarUI.ArrowButtonListener createArrowButtonListener()
createArrowButtonListener
in class BasicScrollBarUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class BasicScrollBarUI