public class Animator extends Object
The animator loops on:
Util.platformTimeMillis()
,Animation.tick(long)
of all the registered animations,Only one animator can be running at any time.
Constructor and Description |
---|
Animator()
Creates an animator.
|
Modifier and Type | Method and Description |
---|---|
void |
startAnimation(Animation animation)
Starts an animation.
|
void |
stopAllAnimations()
Stops all the animations.
|
void |
stopAnimation(Animation animation)
Stops an animation.
|
public Animator()
Multiple animators may be created but only one can be running at any time.
public void startAnimation(Animation animation)
The animation tick method is then called every period.
animation
- the animation to start.Animation.tick(long)
public void stopAnimation(Animation animation)
The tick method of the given animation will not be called anymore by this animator.
This method must be called in the MicroUI thread.
animation
- the animation to stop.IllegalStateException
- if this method is called in an other thread than the MicroUI thread or during an animation tick.public void stopAllAnimations()
The tick method of every animation will not be called anymore by this animator.
This method must be called in the MicroUI thread.
IllegalStateException
- if this method is called in an other thread than the MicroUI thread or during an animation tick.