public class AnimationRunner
extends java.lang.Object
An animation runner which can run only one effect at the same time.
Example :
AnimationRunner runner = new AnimationRunner();
AlphaEffect effect = new AlphaEffect(shell, 0 , 255 , 4000 , new ExpoOut(), null , null );
runner.runEffect( effect);
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.
|
Modifier and Type | Method | Description |
---|---|---|
void |
cancel() |
Stops the current effect if any, and execute the corresponding onCancel
runnable.
|
IEffect |
getEffect() |
Get current effect, or null if no effect is currently running.
|
void |
runEffect(IEffect effect) |
Start a new effect, cancelling the previous one if any.
|
public AnimationRunner()
public AnimationRunner(int framerate)
framerate
- the animation framerate.public IEffect getEffect()
public void runEffect(IEffect effect)
effect
- public void cancel()