Package totalcross.ui.anim
Class PathAnimation
- java.lang.Object
-
- totalcross.ui.anim.ControlAnimation
-
- totalcross.ui.anim.PathAnimation
-
- All Implemented Interfaces:
TimerListener
public class PathAnimation extends ControlAnimation
Creates an animation that follows a path.- Since:
- TotalCross 3.03
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePathAnimation.SetPosition-
Nested classes/interfaces inherited from class totalcross.ui.anim.ControlAnimation
ControlAnimation.AnimationFinished
-
-
Field Summary
Fields Modifier and Type Field Description PathAnimation.SetPositionsetpos-
Fields inherited from class totalcross.ui.anim.ControlAnimation
c, delayAfterFinish, frameRate, releaseScreenShot, totalTime, useOffscreen
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidanimate()static PathAnimationcreate(Control c, int fromX, int fromY, int toX, int toY, ControlAnimation.AnimationFinished animFinish, int totalTime)Creates a path animation, moving the control from a position to another.static PathAnimationcreate(Control c, int toX, int toY, ControlAnimation.AnimationFinished animFinish, int totalTime)Creates a path animation, moving the control to the given x and y positions.static PathAnimationcreate(Control c, int direction, ControlAnimation.AnimationFinished animFinish, int totalTime)Creates a path animation, moving the control in a direction.voidstop(boolean abort)-
Methods inherited from class totalcross.ui.anim.ControlAnimation
computeSpeed, start, then, timerTriggered, with
-
-
-
-
Field Detail
-
setpos
public PathAnimation.SetPosition setpos
-
-
Method Detail
-
animate
protected void animate()
- Specified by:
animatein classControlAnimation
-
stop
public void stop(boolean abort)
- Overrides:
stopin classControlAnimation
-
create
public static PathAnimation create(Control c, int toX, int toY, ControlAnimation.AnimationFinished animFinish, int totalTime)
Creates a path animation, moving the control to the given x and y positions.- Parameters:
c- The control to be movedtoX- The destination X coordinatetoY- The destination Y coordinateanimFinish- An interface method to be called when the animation finished, or null if none.totalTime- The total time in millis that the animation will take, or -1 to use the default value (800ms).
-
create
public static PathAnimation create(Control c, int fromX, int fromY, int toX, int toY, ControlAnimation.AnimationFinished animFinish, int totalTime)
Creates a path animation, moving the control from a position to another.- Parameters:
c- The control to be movedfromX- The origin X coordinatefromY- The origin Y coordinatetoX- The destination X coordinatetoY- The destination Y coordinateanimFinish- An interface method to be called when the animation finished, or null if none.totalTime- The total time in millis that the animation will take, or -1 to use the default value (800ms).
-
create
public static PathAnimation create(Control c, int direction, ControlAnimation.AnimationFinished animFinish, int totalTime)
Creates a path animation, moving the control in a direction.- Parameters:
c- The control to be moveddirection- One of BOTTOM, -BOTTOM, TOP, -TOP, LEFT, -LEFT, RIGHT, -RIGHT. Any other value will return null.animFinish- An interface method to be called when the animation finished, or null if none.totalTime- The total time in millis that the animation will take, or -1 to use the default value (800ms).
-
-