Class SequenceEffect
- java.lang.Object
-
- org.eclipse.nebula.animation.effects.SequenceEffect
-
-
Constructor Summary
Constructors Constructor Description SequenceEffect(IEffect[] effects, java.lang.Runnable onStop, java.lang.Runnable onCancel)
Run several effects one after another.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Set the effect as done and run the cancel runnable.void
doEffect(long time)
Apply effect to the target according to the given time.long
getLength()
Get effect lengthboolean
isDone()
-
-
-
Field Detail
-
currentEffect
int currentEffect
-
effects
IEffect[] effects
-
length
long length
-
onCancel
java.lang.Runnable onCancel
-
onStop
java.lang.Runnable onStop
-
start
long start
-
-
Constructor Detail
-
SequenceEffect
public SequenceEffect(IEffect[] effects, java.lang.Runnable onStop, java.lang.Runnable onCancel)
Run several effects one after another.Note :
- onStop and onCancel runnables applies to the whole sequence effect.
- Each effect can have its own onStop and onCancel.
- Parameters:
effects
-onStop
-onCancel
-
-
-
Method Detail
-
cancel
public void cancel()
Description copied from interface:IEffect
Set the effect as done and run the cancel runnable.- Specified by:
cancel
in interfaceIEffect
- See Also:
IEffect.cancel()
-
doEffect
public void doEffect(long time)
Description copied from interface:IEffect
Apply effect to the target according to the given time.- Specified by:
doEffect
in interfaceIEffect
- Parameters:
time
- - Current time in ms. This value may be larger than the effect length.- See Also:
IEffect.doEffect(long)
-
getLength
public long getLength()
Description copied from interface:IEffect
Get effect length- Specified by:
getLength
in interfaceIEffect
- Returns:
- length (ms)
- See Also:
IEffect.getLength()
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfaceIEffect
- Returns:
- true if the effect as already reached its end.
- See Also:
IEffect.isDone()
-
-