Overview
This Transition
starts all transitions in its content
in
parallel.
content
of this Transition
inherit node
if their
node
variable is not specified.
duration
, repeatCount
, and autoReverse
variables
have no effect on this Transition
.
Code Segment Example:
import javafx.scene.shape.*;
import javafx.animation.transition.*;
...
var node = Rectangle {
x: 100 y: 40
height: 100 width: 100
arcHeight: 50 arcWidth: 50
fill: Color.VIOLET
}
var parTransition = ParallelTransition {
node: node
content: [
FadeTransition { duration: 3s fromValue: 1.0 toValue: 0.3
repeatCount:2 autoReverse: true},
TranslateTransition { duration: 2s fromX: -100 toX: 100
repeatCount:2 autoReverse: true},
RotateTransition { duration: 3s byAngle: 180
repeatCount:4 autoReverse: true},
ScaleTransition { duration: 2s node: node byX: 1.5 byY: 1.5
repeatCount:2 autoReverse: true},
]
}
parTransition.play();
...
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | content | Timeline[] |
A sequence of |
Inherited Variables
javafx.animation.transition.Transition
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | action | function():Void | null |
The action to be executed at the conclusion of this |
|||
public | interpolator | Interpolator | EASEBOTH |
Controls the timing for acceleration and deceleration at each transition cycle. Controls the timing for acceleration and deceleration at each transition cycle. This may only be changed prior to starting the transition or after the transition has ended. If changed during a transition then the change will not take effect until the next transition. Default interpolator is set to Interpolator#EASEBOTH. EASEBOTHProfile: common |
|||
public | node | Node | null |
The target node of this |
|||
protected | parent | Transition | subclass | subclass | subclass | null |
The parent of this The parent of this Profile: common |
javafx.animation.Timeline
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | autoReverse | Boolean | false |
Defines whether this animation reverses direction on alternating cycles. Defines whether this animation reverses direction on alternating
cycles.
If Profile: common |
|||
public-read | currentRate | Number | 0.0 |
Read-only variable to indicate current direction/speed at which the
Read-only variable to indicate current direction/speed at which the
Profile: common |
|||
public-read protected | cycleDuration | Duration | subclass | subclass | 0ms |
Read-only variable to indicate the duration of one cycle of this
Read-only variable to indicate the duration of one cycle of this
This is set to the largest time value of its keyFrames. 0msProfile: common |
|
public-init | framerate | Number |
The maximum framerate at which this animation will run, in frames per second. The maximum framerate at which this animation will run, in frames per second. This can be used, for example, to keep particularly complex Timelines from over-consuming system resources. By default, a Timeline's framerate is not explicitly limited, meaning the Timeline will run at an optimal framerate for the underlying platform. Profile: common |
||||
public | interpolate | Boolean | true |
Enable/disable interpolation. |
|||
public | keyFrames | KeyFrame[] |
Defines the sequence of Defines the sequence of
See Also:
Profile: common |
||||
public-read | paused | Boolean |
Read-only var that indicates whether the animation is currently paused. Read-only var that indicates whether the animation is currently paused.
This value is initially
Note that Profile: common |
||||
public | rate | Number | 1.0 |
Defines the direction/speed at which the Defines the direction/speed at which the
The absolute value of
Rate
Inverting the rate of a running Profile: common |
|||
public | repeatCount | Number | 1.0 |
Defines the number of cycles in this animation. Defines the number of cycles in this animation.
The Profile: common |
|||
public-read | running | Boolean |
Read-only var that indicates whether the animation is currently running. Read-only var that indicates whether the animation is currently running.
This value is initially
If
Note that Profile: common |
||||
public | time | Duration | 0ms |
Defines the Defines the
If
If user wants to bind the variable and update it simultaneously, bidirectional
Profile: common |
|||
public-read | totalDuration | Duration | 0ms |
Read-only variable to indicate the total duration of this
Read-only variable to indicate the total duration of this
This is set to cycleDuration * repeatCount. 0msProfile: common |
Function Summary
- public pause() : Void
- public play() : Void
- public playFromStart() : Void
- protected rebuildKeyFrames() : KeyFrame[]
- public stop() : Void
Inherited Functions
javafx.animation.transition.Transition
- protected getTargetNode() : Node
- protected markDirty() : Void
-
Subclasses invoke this function to mark the Transition as dirty and in need of rebuilding the keyFrames for the transition.
Subclasses invoke this function to mark the Transition as dirty and in need of rebuilding the keyFrames for the transition. This function only marks the state as dirty, a subsequent call to rebuild() is necessary to actually rebuild the keyframes. Generally this is done automatically when an animation is started, but can be forced if semantics require it.
- public play() : Void
- public playFromStart() : Void
-
A convenience function which plays this
Transition
from the initial position in the forward direction.A convenience function which plays this
Transition
from the initial position in the forward direction.See Timeline#playFromStart() for details.
Profile: common
- public rebuild() : Void
-
Rebuilds the keyFrames for this Transition if and only if the transition is dirty and a transition is not currently running (where 'running' includes paused transitions).
Rebuilds the keyFrames for this Transition if and only if the transition is dirty and a transition is not currently running (where 'running' includes paused transitions).
- protected abstract rebuildKeyFrames() : KeyFrame[]
- public stop() : Void
javafx.animation.Timeline
- public evaluateKeyValues() : Void
-
Instructs the
Timeline
to evaluate allKeyValue.value()
s in the Timeline.Instructs the
Timeline
to evaluate allKeyValue.value()
s in the Timeline.See Also:
KeyFrame.valuesProfile: common
- public pause() : Void
- public play() : Void
-
Plays
Timeline
from current position in the direction indicated byrate
.Plays
Timeline
from current position in the direction indicated byrate
. If the timeline is running, it has no effect.When
rate
> 0 (forward play), if aTimeline
is already positioned at the end, the first cycle will not be played, it is considered to have already finished. This also applies to a backward (rate
< 0) cycle if a timeline is positioned at the beginning. However, if theTimeline
hasrepeatCount
> 1, following cycle(s) will be played as usual.When
Timeline
reaches the end,Timeline
is stopped and the play head remains at the end.To play a
Timeline
backwards from the end:
timeline.rate = negative rate
timeline.time = overall duration of timeline
timeline.play()
Note:
play()
is an asynchronous call,Timeline
may not start immediately.Profile: common
- public playFromStart() : Void
-
Plays timeline from initial position in forward direction.
Plays timeline from initial position in forward direction.
It is equivalent to
timeline.stop();
timeline.rate = Math.abs(timeline.rate); timeline.time = 0.0s;
timeline.play();
Note:
playFromStart()
is an asynchronous call,Timeline
may not start immediately.Profile: common
- public stop() : Void