Package 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 java.lang.ObjectEncapsulates the code needed to perform timer-controlled scrolling. This class is used byTerraScrollBarSkin(automatic block increment scrolling) andScrollButtonSkin(automatic unit increment scrolling).
-
-
Field Summary
Fields Modifier and Type Field Description intdirectionMouse.ScrollTypeincrementTypeintstopValue
-
Constructor Summary
Constructors Modifier Constructor Description protectedAutomaticScroller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidstart(int directionArgument, Mouse.ScrollType incrementTypeArgument, int stopValueArgument)Starts scrolling this skin's scroll bar, stopping the scroll when the specified value has been reached.voidstop()Stops any automatic scrolling in progress.
-
-
-
Field Detail
-
direction
public int direction
-
incrementType
public Mouse.ScrollType incrementType
-
stopValue
public int stopValue
-
-
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-1to adjust the scroll bar's value larger;-1to 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-1to specify no stop value- Throws:
java.lang.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.
-
-