public abstract class AbstractEffect extends java.lang.Object implements IEffect
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
done |
protected IMovement |
easingFunction |
protected long |
length |
protected java.lang.Runnable |
runnableOnCancel |
protected java.lang.Runnable |
runnableOnStop |
| Constructor and Description |
|---|
AbstractEffect(long lengthMilli,
IMovement movement)
Create a new effect.
|
AbstractEffect(long lengthMilli,
IMovement movement,
java.lang.Runnable onStop,
java.lang.Runnable onCancel)
Create a new effect, with listeners for stop and cancel events.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
applyEffect(long currentTime)
Apply this effect.
|
void |
cancel()
Set the effect as done and run the cancel runnable.
|
protected void |
doCancel()
Run the onCancel runnable if any.
|
void |
doEffect() |
void |
doEffect(long time)
Apply effect to the target according to the given time.
|
protected void |
doStop()
Run the onStop runnable if any.
|
long |
getLength()
Get effect length
|
boolean |
isDone() |
void |
processEnd(long time)
Check if the effect has ended.
|
protected boolean done
protected IMovement easingFunction
protected long length
protected java.lang.Runnable runnableOnCancel
protected java.lang.Runnable runnableOnStop
public AbstractEffect(long lengthMilli,
IMovement movement)
lengthMilli - movement - public AbstractEffect(long lengthMilli,
IMovement movement,
java.lang.Runnable onStop,
java.lang.Runnable onCancel)
lengthMilli - movement - onStop - onCancel - public abstract void applyEffect(long currentTime)
currentTime - public void cancel()
IEffectcancel in interface IEffectIEffect.cancel()protected void doCancel()
public void doEffect()
org.eclipse.nebula.animation.effects.IEffect#doEffect()public void doEffect(long time)
IEffectdoEffect in interface IEffecttime - - Current time in ms. This value may be larger than the effect
length.IEffect.doEffect(long)protected void doStop()
public long getLength()
IEffectgetLength in interface IEffectIEffect.getLength()public boolean isDone()
isDone in interface IEffectIEffect.isDone()public void processEnd(long time)