Transition creates a move/translate animation that spans its
duration. This is done by updating the translateX,
translateY and translateZ variables of the node at
regular intervals.
It starts from the (fromX, fromY, fromZ) value if
provided else uses the node's (translateX, translateY, translateZ) value.
It stops at the (toX, toY, toZ) value if provided
else it will use start value plus (byX, byY, byZ)
value.
The (toX, toY, toZ) value takes precedence if both (
toX, toY, toZ) and (byX, byY,
byZ) values are specified.
Code Segment Example:
import javafx.scene.shape.*;
import javafx.animation.*;
...
Rectangle rect = new Rectangle (100, 40, 100, 100);
rect.setArcHeight(50);
rect.setArcWidth(50);
rect.setFill(Color.VIOLET);
TranslateTransition tt = new TranslateTransition(Duration.millis(2000), rect);
tt.setByX(200f);
tt.setCycleCount(4f);
tt.setAutoReverse(true);
tt.play();
...
Transition, Animation
| Modifier and Type | Field and Description |
|---|---|
| private DoubleProperty | byX
Specifies the incremented stop X coordinate value, from the start, of
this |
| private DoubleProperty | byY
Specifies the incremented stop Y coordinate value, from the start, of
this |
| private DoubleProperty | byZ
Specifies the incremented stop Z coordinate value, from the start, of
this |
| private Node | |
| private static final double | |
| private static final double | |
| private static final double | |
| private static final Duration | |
| private static final double | |
| private static final double | |
| private static final double | |
| private static final Node | |
| private static final double | |
| private static final double | |
| private static final double | |
| private double | |
| private double | |
| private double | |
| private ObjectProperty | duration
The duration of this |
| private static final double | |
| private DoubleProperty | fromX
Specifies the start X coordinate value of this
|
| private DoubleProperty | fromY
Specifies the start Y coordinate value of this
|
| private DoubleProperty | fromZ
Specifies the start Z coordinate value of this
|
| private ObjectProperty | node
The target node of this |
| private double | |
| private double | |
| private double | |
| private DoubleProperty | toX
Specifies the stop X coordinate value of this |
| private DoubleProperty | toY
Specifies the stop Y coordinate value of this |
| private DoubleProperty | toZ
Specifies the stop Z coordinate value of this |
| Access | Constructor and Description |
|---|---|
| public | TranslateTransition(Duration
The duration of the duration, Node TranslateTransitionThe node)node which will be translatedThe constructor of |
| public | TranslateTransition(Duration
The duration of the duration)TranslateTransitionThe constructor of |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final ObjectProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final double | |
| public final double | |
| public final double | |
| public final Duration | |
| public final double | |
| public final double | |
| public final double | |
| public final Node | |
| private Node | |
| public final double | |
| public final double | |
| public final double | |
| public void | interpolate(double
The relative position frac)Implements abstract javafx. The method |
| public final ObjectProperty | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| pack-priv boolean | |
| pack-priv void | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final DoubleProperty |
| byX | back to summary |
|---|---|
| private DoubleProperty byX Specifies the incremented stop X coordinate value, from the start, of
this
It is not possible to change | |
| byY | back to summary |
|---|---|
| private DoubleProperty byY Specifies the incremented stop Y coordinate value, from the start, of
this
It is not possible to change | |
| byZ | back to summary |
|---|---|
| private DoubleProperty byZ Specifies the incremented stop Z coordinate value, from the start, of
this
It is not possible to change | |
| cachedNode | back to summary |
|---|---|
| private Node cachedNode | |
| DEFAULT_BY_X | back to summary |
|---|---|
| private static final double DEFAULT_BY_X | |
| DEFAULT_BY_Y | back to summary |
|---|---|
| private static final double DEFAULT_BY_Y | |
| DEFAULT_BY_Z | back to summary |
|---|---|
| private static final double DEFAULT_BY_Z | |
| DEFAULT_DURATION | back to summary |
|---|---|
| private static final Duration DEFAULT_DURATION | |
| DEFAULT_FROM_X | back to summary |
|---|---|
| private static final double DEFAULT_FROM_X | |
| DEFAULT_FROM_Y | back to summary |
|---|---|
| private static final double DEFAULT_FROM_Y | |
| DEFAULT_FROM_Z | back to summary |
|---|---|
| private static final double DEFAULT_FROM_Z | |
| DEFAULT_NODE | back to summary |
|---|---|
| private static final Node DEFAULT_NODE | |
| DEFAULT_TO_X | back to summary |
|---|---|
| private static final double DEFAULT_TO_X | |
| DEFAULT_TO_Y | back to summary |
|---|---|
| private static final double DEFAULT_TO_Y | |
| DEFAULT_TO_Z | back to summary |
|---|---|
| private static final double DEFAULT_TO_Z | |
| deltaX | back to summary |
|---|---|
| private double deltaX | |
| deltaY | back to summary |
|---|---|
| private double deltaY | |
| deltaZ | back to summary |
|---|---|
| private double deltaZ | |
| duration | back to summary |
|---|---|
| private ObjectProperty<Duration> duration The duration of this
It is not possible to change the Note While the unit of
| |
| EPSILON | back to summary |
|---|---|
| private static final double EPSILON | |
| fromX | back to summary |
|---|---|
| private DoubleProperty fromX Specifies the start X coordinate value of this
It is not possible to change
| |
| fromY | back to summary |
|---|---|
| private DoubleProperty fromY Specifies the start Y coordinate value of this
It is not possible to change
| |
| fromZ | back to summary |
|---|---|
| private DoubleProperty fromZ Specifies the start Z coordinate value of this
It is not possible to change
| |
| node | back to summary |
|---|---|
| private ObjectProperty<Node> node The target node of this
It is not possible to change the target | |
| startX | back to summary |
|---|---|
| private double startX | |
| startY | back to summary |
|---|---|
| private double startY | |
| startZ | back to summary |
|---|---|
| private double startZ | |
| toX | back to summary |
|---|---|
| private DoubleProperty toX Specifies the stop X coordinate value of this
It is not possible to change
| |
| toY | back to summary |
|---|---|
| private DoubleProperty toY Specifies the stop Y coordinate value of this
It is not possible to change
| |
| toZ | back to summary |
|---|---|
| private DoubleProperty toZ Specifies the stop Z coordinate value of this
It is not possible to change
| |
| TranslateTransition | back to summary |
|---|---|
| public TranslateTransition(Duration duration, Node node) The constructor of | |
| TranslateTransition | back to summary |
|---|---|
| public TranslateTransition(Duration duration) The constructor of
| |
| TranslateTransition | back to summary |
|---|---|
| public TranslateTransition() The constructor of | |
| byXProperty | back to summary |
|---|---|
| public final DoubleProperty byXProperty() | |
| byYProperty | back to summary |
|---|---|
| public final DoubleProperty byYProperty() | |
| byZProperty | back to summary |
|---|---|
| public final DoubleProperty byZProperty() | |
| durationProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| fromXProperty | back to summary |
|---|---|
| public final DoubleProperty fromXProperty() | |
| fromYProperty | back to summary |
|---|---|
| public final DoubleProperty fromYProperty() | |
| fromZProperty | back to summary |
|---|---|
| public final DoubleProperty fromZProperty() | |
| getByX | back to summary |
|---|---|
| public final double getByX() | |
| getByY | back to summary |
|---|---|
| public final double getByY() | |
| getByZ | back to summary |
|---|---|
| public final double getByZ() | |
| getDuration | back to summary |
|---|---|
| public final Duration getDuration() | |
| getFromX | back to summary |
|---|---|
| public final double getFromX() | |
| getFromY | back to summary |
|---|---|
| public final double getFromY() | |
| getFromZ | back to summary |
|---|---|
| public final double getFromZ() | |
| getNode | back to summary |
|---|---|
| public final Node getNode() | |
| getTargetNode | back to summary |
|---|---|
| private Node getTargetNode() | |
| getToX | back to summary |
|---|---|
| public final double getToX() | |
| getToY | back to summary |
|---|---|
| public final double getToY() | |
| getToZ | back to summary |
|---|---|
| public final double getToZ() | |
| interpolate | back to summary |
|---|---|
| public void interpolate(double frac) Implements abstract javafx. Doc from javafx. The method
| |
| nodeProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| setByX | back to summary |
|---|---|
| public final void setByX(double value) | |
| setByY | back to summary |
|---|---|
| public final void setByY(double value) | |
| setByZ | back to summary |
|---|---|
| public final void setByZ(double value) | |
| setDuration | back to summary |
|---|---|
| public final void setDuration(Duration value) | |
| setFromX | back to summary |
|---|---|
| public final void setFromX(double value) | |
| setFromY | back to summary |
|---|---|
| public final void setFromY(double value) | |
| setFromZ | back to summary |
|---|---|
| public final void setFromZ(double value) | |
| setNode | back to summary |
|---|---|
| public final void setNode(Node value) | |
| setToX | back to summary |
|---|---|
| public final void setToX(double value) | |
| setToY | back to summary |
|---|---|
| public final void setToY(double value) | |
| setToZ | back to summary |
|---|---|
| public final void setToZ(double value) | |
| startable | back to summary |
|---|---|
| pack-priv boolean startable(boolean forceSync) Overrides javafx.
| |
| sync | back to summary |
|---|---|
| pack-priv void sync(boolean forceSync) Overrides javafx.
| |
| toXProperty | back to summary |
|---|---|
| public final DoubleProperty toXProperty() | |
| toYProperty | back to summary |
|---|---|
| public final DoubleProperty toYProperty() | |
| toZProperty | back to summary |
|---|---|
| public final DoubleProperty toZProperty() | |