Class ParallelEffect

java.lang.Object
org.eclipse.nebula.animation.effects.ParallelEffect
All Implemented Interfaces:
IEffect

public class ParallelEffect
extends java.lang.Object
implements IEffect
A wrapper for running effects in parallel.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) IEffect[] effects  
    (package private) long length  
    (package private) java.lang.Runnable onCancel  
    (package private) java.lang.Runnable onStop  
  • 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

    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 length
    boolean isDone()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • 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 Details