Class ParallelEffect
- java.lang.Object
-
- org.eclipse.nebula.animation.effects.ParallelEffect
-
-
Constructor Summary
Constructors Constructor Description ParallelEffect(java.util.List<IEffect> effects)Wrap several effects and start them in parallel.ParallelEffect(java.util.List<IEffect> effects, java.lang.Runnable onStop, java.lang.Runnable onCancel)Wrap several effects and start them in parallel.ParallelEffect(IEffect[] effects)Wrap several effects and start them in parallel.ParallelEffect(IEffect[] effects, java.lang.Runnable onStop, java.lang.Runnable onCancel)Wrap several effects and start them in parallel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Set the effect as done and run the cancel runnable.voiddoEffect(long time)Apply effect to the target according to the given time.longgetLength()Get effect lengthbooleanisDone()
-
-
-
Field Detail
-
effects
IEffect[] effects
-
length
long length
-
onCancel
java.lang.Runnable onCancel
-
onStop
java.lang.Runnable onStop
-
-
Constructor Detail
-
ParallelEffect
public ParallelEffect(IEffect[] effects)
Wrap several effects and start them in parallel.- Parameters:
effects-
-
ParallelEffect
public ParallelEffect(IEffect[] effects, java.lang.Runnable onStop, java.lang.Runnable onCancel)
Wrap several effects and start them in parallel.- Parameters:
effects-onStop-onCancel-
-
ParallelEffect
public ParallelEffect(java.util.List<IEffect> effects)
Wrap several effects and start them in parallel.- Parameters:
effects-
-
ParallelEffect
public ParallelEffect(java.util.List<IEffect> effects, java.lang.Runnable onStop, java.lang.Runnable onCancel)
Wrap several effects and start them in parallel.- Parameters:
effects-onStop-onCancel-
-
-
Method Detail
-
cancel
public void cancel()
Description copied from interface:IEffectSet the effect as done and run the cancel runnable.- Specified by:
cancelin interfaceIEffect- See Also:
IEffect.cancel()
-
doEffect
public void doEffect(long time)
Description copied from interface:IEffectApply effect to the target according to the given time.- Specified by:
doEffectin 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:IEffectGet effect length- Specified by:
getLengthin interfaceIEffect- Returns:
- length (ms)
- See Also:
IEffect.getLength()
-
isDone
public boolean isDone()
- Specified by:
isDonein interfaceIEffect- Returns:
- true if the effect as already reached its end.
- See Also:
IEffect.isDone()
-
-