org.apache.pivot.wtk.skin.terra
Class TerraScrollBarSkin.AutomaticScroller

java.lang.Object
  extended by 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).


Field Summary
 int direction
           
 Mouse.ScrollType incrementType
           
 int stopValue
           
 
Constructor Summary
protected TerraScrollBarSkin.AutomaticScroller()
           
 
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
 

Field Detail

direction

public int direction

incrementType

public Mouse.ScrollType incrementType

stopValue

public int stopValue
Constructor Detail

TerraScrollBarSkin.AutomaticScroller

protected TerraScrollBarSkin.AutomaticScroller()
Method Detail

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 smaller
incrementTypeArgument - Determines whether we'll use the scroll bar's unit increment or the block increment when scrolling
stopValueArgument - 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.