org.apache.pivot.wtk.skin.terra
Class TerraScrollBarSkin.AutomaticScroller
java.lang.Object
org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin.AutomaticScroller
- Enclosing class:
- TerraScrollBarSkin
protected class TerraScrollBarSkin.AutomaticScroller
- extends Object
Encapsulates the code needed to perform timer-controlled scrolling. This
class is used by TerraScrollBarSkin (automatic block increment
scrolling) and ScrollButtonSkin (automatic unit increment
scrolling).
Method Summary |
void |
start(int directionArgument,
Mouse.ScrollType incrementTypeArgument,
int stopValueArgument)
Starts scrolling this skin's scroll bar, stopping the scroll when
the specified value has been reached. |
void |
stop()
Stops any automatic scrolling in progress. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
direction
public int direction
incrementType
public Mouse.ScrollType incrementType
stopValue
public int stopValue
TerraScrollBarSkin.AutomaticScroller
protected TerraScrollBarSkin.AutomaticScroller()
start
public void start(int directionArgument,
Mouse.ScrollType incrementTypeArgument,
int stopValueArgument)
- Starts scrolling this skin's scroll bar, stopping the scroll when
the specified value has been reached.
- Parameters:
directionArgument
- 1 to adjust the scroll bar's value larger; -1 to
adjust it smallerincrementTypeArgument
- Determines whether we'll use the scroll bar's unit increment or the
block increment when scrollingstopValueArgument
- The value which, once reached, will stop the automatic scrolling.
Use -1 to specify no stop value
- Throws:
IllegalStateException
- If automatic scrolling of any scroll bar is already in progress.
Only one scroll bar may be automatically scrolled at one time
stop
public void stop()
- Stops any automatic scrolling in progress.