Package org.eclipse.nebula.cwt.animation
Class AnimationRunner
- java.lang.Object
-
- org.eclipse.nebula.cwt.animation.AnimationRunner
-
public class AnimationRunner extends java.lang.Object
An animation runner which can run only one effect at the same time.
-
-
Constructor Summary
Constructors Constructor Description AnimationRunner()
Create a new animation runner using the default framerate (50 fps)AnimationRunner(int framerate)
Create a new animation runner, which can run only one effect at the same time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Stops the current effect if any, and execute the corresponding onCancel runnable.void
runEffect(IEffect effect)
Start a new effect, cancelling the previous one if any.private void
startEffect()
-
-
-
Field Detail
-
delay
int delay
Default is 50 fps.
-
effect
IEffect effect
-
running
boolean running
-
-
Constructor Detail
-
AnimationRunner
public AnimationRunner()
Create a new animation runner using the default framerate (50 fps)
-
AnimationRunner
public AnimationRunner(int framerate)
Create a new animation runner, which can run only one effect at the same time.- Parameters:
framerate
- the animation framerate.
-
-
Method Detail
-
runEffect
public void runEffect(IEffect effect)
Start a new effect, cancelling the previous one if any.- Parameters:
effect
-
-
cancel
public void cancel()
Stops the current effect if any, and execute the corresponding onCancel runnable.
-
startEffect
private void startEffect()
-
-