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.Object
Encapsulates 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 int
direction
Mouse.ScrollType
incrementType
int
stopValue
-
Constructor Summary
Constructors Modifier Constructor Description protected
AutomaticScroller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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
-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:
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.
-
-