Animation provides the core functionality of all animations
used in the JavaFX runtime.
An animation can run in a loop by setting cycleCount.
To make an animation run back and forth while looping, set the
autoReverse -flag.
Call play() or playFromStart() to play an Animation
. The Animation progresses in the direction and speed specified by
rate, and stops when its duration is elapsed. An Animation
with indefinite duration (a cycleCount of INDEFINITE) runs
repeatedly until the stop() method is explicitly called, which will
stop the running Animation and reset its play head to the initial
position.
An Animation can be paused by calling pause(), and the next
play() call will resume the Animation from where it was
paused.
An Animation's play head can be randomly positioned, whether it is
running or not. If the Animation is running, the play head jumps to
the specified position immediately and continues playing from new position.
If the Animation is not running, the next play() will start
the Animation from the specified position.
Inverting the value of rate toggles the play direction.
The animation runs on the JavaFX Application Thread.
Timeline, Transition
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private class | |
| public static enum | Animation.
The possible states for |
| Modifier and Type | Field and Description |
|---|---|
| private BooleanProperty | autoReverse
Defines whether this
|
| pack-priv ClipEnvelope | clipEnvelope
The type of ClipEnvelope for the animation is determined by its cycleCount and cycleDuration and is updated when these values change. |
| private ObservableMap | |
| private ReadOnlyDoubleProperty | currentRate
Read-only variable to indicate current direction/speed at which the
|
| private long | |
| private Animation. | currentTime
Defines the |
| private IntegerProperty | cycleCount
Defines the number of cycles in this animation. |
| private ReadOnlyObjectProperty | cycleDuration
Read-only variable to indicate the duration of one cycle of this
|
| private static final boolean | |
| private static final double | |
| private static final int | |
| private static final Duration | |
| private static final Duration | |
| private static final EventHandler | |
| private static final double | |
| private static final Animation. | |
| private static final Duration | |
| private ObjectProperty | delay
Delays the start of an animation. |
| private static final double | |
| public static final int | INDEFINITE
Used as a value for |
| private boolean | |
| private boolean | |
| private long | |
| private double | |
| private ObjectProperty | onFinished
The action to be executed at the conclusion of this |
| pack-priv Animation | parent
The parent of this |
| private boolean | |
| private long | |
| pack-priv final PulseReceiver | |
| private DoubleProperty | rate
Defines the direction/speed at which the |
| private final int | |
| private long | |
| private ReadOnlyObjectProperty | status
The status of the |
| private final double | |
| private final AbstractPrimaryTimer | |
| private ReadOnlyObjectProperty | totalDuration
Read-only variable to indicate the total duration of this
|
| Access | Constructor and Description |
|---|---|
| protected | Animation(double
The custom target frame rate for this targetFramerate)AnimationThe constructor of |
| protected | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static boolean | Returns: true i.f.f. Math.abs(rate1 - rate2) < EPSILONChecks if 2 rates are effectively equal. |
| public final BooleanProperty | |
| public final ReadOnlyDoubleProperty | |
| public final ReadOnlyObjectProperty | |
| public final IntegerProperty | |
| public final ReadOnlyObjectProperty | |
| public final ObjectProperty | |
| pack-priv abstract void | |
| pack-priv void | |
| pack-priv abstract void | |
| pack-priv void | |
| private void | doSetCurrentRate(double
the value of the new current rate value)The current rate changes in 3 cases:
|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv final void | |
| public final ObservableMap | Returns: javafx. of cue pointsThe cue points can be
used to mark important positions of the |
| public final double | |
| public final Duration | |
| public final int | |
| public final Duration | |
| public final Duration | |
| public final EventHandler | |
| public final double | |
| public final Animation. | |
| public final double | Returns: the target framerateThe target framerate is the maximum framerate at which this |
| public final Duration | |
| public final boolean | |
| pack-priv static final boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| private boolean | |
| pack-priv boolean | |
| public void | |
| public void | |
| private long | |
| public final ObjectProperty | |
| public void | |
| private void | |
| pack-priv void | |
| public void | |
| public void | |
| public void | |
| private void | |
| private void | |
| public void | |
| private void | |
| private void | |
| public final DoubleProperty | |
| pack-priv void | |
| pack-priv void | |
| public final void | |
| pack-priv void | |
| pack-priv void | |
| public final void | |
| protected final void | |
| public final void | |
| public final void | |
| public final void | |
| protected final void | |
| pack-priv boolean | |
| pack-priv void | |
| public final ReadOnlyObjectProperty | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| private void | |
| public final ReadOnlyObjectProperty | |
| private void |