public class SubstanceScrollBarUI extends javax.swing.plaf.basic.BasicScrollBarUI implements TransitionAwareUI
| Modifier and Type | Class and Description |
|---|---|
protected class |
SubstanceScrollBarUI.SubstanceArrowButtonListener
Listener on arrow buttons.
|
protected class |
SubstanceScrollBarUI.SubstanceTrackListener
Track mouse drags.
|
javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener, javax.swing.plaf.basic.BasicScrollBarUI.ModelListener, javax.swing.plaf.basic.BasicScrollBarUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener, javax.swing.plaf.basic.BasicScrollBarUI.TrackListener| Modifier and Type | Field and 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 javax.swing.JButton |
mySecondDecreaseButton
The second decrease button.
|
protected javax.swing.JButton |
mySecondIncreaseButton
The second increase button.
|
protected int |
scrollBarWidth
Scroll bar width.
|
protected java.awt.event.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| Modifier | Constructor and Description |
|---|---|
protected |
SubstanceScrollBarUI(javax.swing.JComponent b)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener |
createArrowButtonListener() |
protected javax.swing.JButton |
createDecreaseButton(int orientation) |
protected javax.swing.JButton |
createGeneralDecreaseButton(int orientation,
boolean isRegular)
Creates a decrease button.
|
protected javax.swing.JButton |
createGeneralIncreaseButton(int orientation,
boolean isRegular)
Creates a increase button.
|
protected javax.swing.JButton |
createIncreaseButton(int orientation) |
protected javax.swing.plaf.basic.BasicScrollBarUI.TrackListener |
createTrackListener() |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent comp) |
static java.lang.String |
getMemoryUsage()
Returns the memory usage string.
|
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c) |
protected ComponentState |
getState(javax.swing.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(java.awt.event.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(javax.swing.JScrollBar sb) |
protected void |
layoutHScrollbarAdjacent(javax.swing.JScrollBar sb)
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT. |
protected void |
layoutHScrollbarMultiple(javax.swing.JScrollBar sb)
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE. |
protected void |
layoutHScrollbarMultipleBoth(javax.swing.JScrollBar sb)
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE. |
protected void |
layoutHScrollbarNone(javax.swing.JScrollBar sb)
Lays out the horizontal scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.NONE. |
protected void |
layoutVScrollbar(javax.swing.JScrollBar sb) |
protected void |
layoutVScrollbarAdjacent(javax.swing.JScrollBar sb)
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT. |
protected void |
layoutVScrollbarMultiple(javax.swing.JScrollBar sb)
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE. |
protected void |
layoutVScrollbarMultipleBoth(javax.swing.JScrollBar sb)
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH. |
protected void |
layoutVScrollbarNone(javax.swing.JScrollBar sb)
Lays out the vertical scroll bar when the button policy is
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT. |
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c) |
protected void |
paintThumb(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle thumbBounds) |
protected void |
paintTrack(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.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, uninstallUIprotected javax.swing.JButton mySecondDecreaseButton
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT,
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE and
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH
modes.protected javax.swing.JButton mySecondIncreaseButton
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH mode.protected StateTransitionTracker compositeStateTransitionTracker
protected int scrollBarWidth
protected java.awt.event.AdjustmentListener substanceAdjustmentListener
protected org.pushingpixels.substance.internal.ui.SubstanceScrollBarUI.CompositeButtonModel compositeScrollTrackModel
protected SubstanceScrollBarUI(javax.swing.JComponent b)
b - Associated component.public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
protected javax.swing.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 javax.swing.JButton createDecreaseButton(int orientation)
createDecreaseButton in class javax.swing.plaf.basic.BasicScrollBarUIprotected javax.swing.JButton createIncreaseButton(int orientation)
createIncreaseButton in class javax.swing.plaf.basic.BasicScrollBarUIprotected javax.swing.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(javax.swing.JButton scrollButton)
scrollButton - Scroll button.protected void paintTrack(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle trackBounds)
paintTrack in class javax.swing.plaf.basic.BasicScrollBarUIprotected void paintThumb(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle thumbBounds)
paintThumb in class javax.swing.plaf.basic.BasicScrollBarUIpublic void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.basic.BasicScrollBarUIprotected void installDefaults()
installDefaults in class javax.swing.plaf.basic.BasicScrollBarUIprotected void installComponents()
installComponents in class javax.swing.plaf.basic.BasicScrollBarUIprotected void uninstallComponents()
uninstallComponents in class javax.swing.plaf.basic.BasicScrollBarUIprotected void installListeners()
installListeners in class javax.swing.plaf.basic.BasicScrollBarUIprotected void uninstallListeners()
uninstallListeners in class javax.swing.plaf.basic.BasicScrollBarUIpublic boolean isInside(java.awt.event.MouseEvent me)
TransitionAwareUIisInside in interface TransitionAwareUIme - 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()
TransitionAwareUIgetTransitionTracker in interface TransitionAwareUIpublic void scrollByBlock(int direction)
scrollByBlock in class javax.swing.plaf.basic.BasicScrollBarUIpublic void scrollByUnits(int direction,
int units)
direction - Direction.units - Scroll units.protected void layoutVScrollbar(javax.swing.JScrollBar sb)
layoutVScrollbar in class javax.swing.plaf.basic.BasicScrollBarUIprotected void layoutHScrollbar(javax.swing.JScrollBar sb)
layoutHScrollbar in class javax.swing.plaf.basic.BasicScrollBarUIprotected void layoutVScrollbarAdjacent(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT.sb - Scroll bar.protected void layoutVScrollbarNone(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT.sb - Scroll bar.protected void layoutVScrollbarMultiple(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE.sb - Scroll bar.protected void layoutVScrollbarMultipleBoth(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE_BOTH.sb - Scroll bar.protected void layoutHScrollbarAdjacent(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.ADJACENT.sb - Scroll bar.protected void layoutHScrollbarNone(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.NONE.sb - Scroll bar.protected void layoutHScrollbarMultiple(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE.sb - Scroll bar.protected void layoutHScrollbarMultipleBoth(javax.swing.JScrollBar sb)
SubstanceConstants.ScrollPaneButtonPolicyKind.MULTIPLE.sb - Scroll bar.public static java.lang.String getMemoryUsage()
protected javax.swing.plaf.basic.BasicScrollBarUI.TrackListener createTrackListener()
createTrackListener in class javax.swing.plaf.basic.BasicScrollBarUIprotected javax.swing.plaf.basic.BasicScrollBarUI.ArrowButtonListener createArrowButtonListener()
createArrowButtonListener in class javax.swing.plaf.basic.BasicScrollBarUIpublic java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize in class javax.swing.plaf.basic.BasicScrollBarUI