Package totalcross.ui.anim
Class ControlAnimation
- java.lang.Object
-
- totalcross.ui.anim.ControlAnimation
-
- All Implemented Interfaces:
TimerListener
- Direct Known Subclasses:
FadeAnimation,PathAnimation
public abstract class ControlAnimation extends java.lang.Object implements TimerListener
Abstract class used to create and handle animations- Since:
- TotalCross 3.03
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceControlAnimation.AnimationFinished
-
Field Summary
Fields Modifier and Type Field Description protected ControlcintdelayAfterFinishA delay issued right after the animation finishesstatic intframeRateprotected booleanreleaseScreenShotprotected inttotalTimebooleanuseOffscreenUse or not the offscreen.
-
Constructor Summary
Constructors Constructor Description ControlAnimation(Control c)ControlAnimation(Control c, ControlAnimation.AnimationFinished animFinish)ControlAnimation(Control c, ControlAnimation.AnimationFinished animFinish, int totalTime)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidanimate()protected doublecomputeSpeed(double distance)voidstart()voidstop(boolean abort)ControlAnimationthen(ControlAnimation other)voidtimerTriggered(TimerEvent e)A TRIGGERED event was dispatched.ControlAnimationwith(ControlAnimation other)
-
-
-
Field Detail
-
c
protected Control c
-
totalTime
protected int totalTime
-
releaseScreenShot
protected boolean releaseScreenShot
-
frameRate
public static int frameRate
-
delayAfterFinish
public int delayAfterFinish
A delay issued right after the animation finishes
-
useOffscreen
public boolean useOffscreen
Use or not the offscreen.
-
-
Constructor Detail
-
ControlAnimation
public ControlAnimation(Control c, ControlAnimation.AnimationFinished animFinish, int totalTime)
-
ControlAnimation
public ControlAnimation(Control c, ControlAnimation.AnimationFinished animFinish)
-
ControlAnimation
public ControlAnimation(Control c)
-
-
Method Detail
-
start
public void start()
-
stop
public void stop(boolean abort)
-
computeSpeed
protected double computeSpeed(double distance)
-
with
public ControlAnimation with(ControlAnimation other)
-
then
public ControlAnimation then(ControlAnimation other)
-
timerTriggered
public void timerTriggered(TimerEvent e)
Description copied from interface:TimerListenerA TRIGGERED event was dispatched.- Specified by:
timerTriggeredin interfaceTimerListener- See Also:
TimerEvent
-
animate
protected abstract void animate()
-
-