JavaFX Parallel TransitionThis transition applies multiple animations on a node in parallel. It is similar to Sequential Transition except the fact that it applies multiple transition on a node at the same time while the sequential transition applies the multiple transition on the node by the order in which the animations are passed into the constructor. In JavaFX, the class javafx.animation.ParallelTransition represents the parallel transition. We just need to pass the list of transitions into the constructor while instantiating this class. PropertiesThe class contains only one property that is described in the following table along with its setter method.
ConstructorsThere are four constructors in the class.
ExampleIn the following example, we have created a polygon and applied various animations on it in parallel. Output: Simulating Parallel transitionThe following code illustrates the simulation of the parallel transitions on the different nodes. Here, we have applied similar transitions on the different nodes without using ParallelTransition. Output:
Next TopicJavaFX Pause Transition
|