Transition creates a rotation animation that spans its
duration. This is done by updating the rotate variable of the
node at regular intervals. The angle value is specified in degrees.
It starts from the fromAngle if provided else uses the node's
rotate value.
It stops at the toAngle value if provided else it will use start
value plus byAngle.
The toAngle takes precedence if both toAngle and
byAngle 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);
RotateTransition rt = new RotateTransition(Duration.millis(3000), rect);
rt.setByAngle(180);
rt.setCycleCount(4);
rt.setAutoReverse(true);
rt.play();
...
Transition, Animation
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | axis
Specifies the axis of rotation for this |
| private DoubleProperty | byAngle
Specifies the incremented stop angle value, from the start, of this
|
| private Node | |
| private static final Point3D | |
| private static final double | |
| private static final Duration | |
| private static final double | |
| private static final Node | |
| private static final double | |
| private double | |
| private ObjectProperty | duration
The duration of this |
| private static final double | |
| private DoubleProperty | fromAngle
Specifies the start angle value for this |
| private ObjectProperty | node
The target node of this |
| private double | |
| private DoubleProperty | toAngle
Specifies the stop angle value for this |
| Access | Constructor and Description |
|---|---|
| public | RotateTransition(Duration
The duration of the duration, Node RotateTransitionThe node)node which will be rotatedThe constructor of |
| public | RotateTransition(Duration
The duration of the duration)RotateTransitionThe constructor of |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final ObjectProperty | |
| public final DoubleProperty | |
| public final ObjectProperty | |
| public final DoubleProperty | |
| public final Point3D | |
| public final double | |
| public final Duration | |
| public final double | |
| public final Node | |
| private Node | |
| public final double | |
| protected 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 | |
| pack-priv boolean | |
| pack-priv void | |
| public final DoubleProperty |
| axis | back to summary |
|---|---|
| private ObjectProperty<Point3D> axis Specifies the axis of rotation for this
It is not possible to change the
| |
| byAngle | back to summary |
|---|---|
| private DoubleProperty byAngle Specifies the incremented stop angle value, from the start, of this
It is not possible to change | |
| cachedNode | back to summary |
|---|---|
| private Node cachedNode | |
| DEFAULT_AXIS | back to summary |
|---|---|
| private static final Point3D DEFAULT_AXIS | |
| DEFAULT_BY_ANGLE | back to summary |
|---|---|
| private static final double DEFAULT_BY_ANGLE | |
| DEFAULT_DURATION | back to summary |
|---|---|
| private static final Duration DEFAULT_DURATION | |
| DEFAULT_FROM_ANGLE | back to summary |
|---|---|
| private static final double DEFAULT_FROM_ANGLE | |
| DEFAULT_NODE | back to summary |
|---|---|
| private static final Node DEFAULT_NODE | |
| DEFAULT_TO_ANGLE | back to summary |
|---|---|
| private static final double DEFAULT_TO_ANGLE | |
| delta | back to summary |
|---|---|
| private double delta | |
| 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 | |
| fromAngle | back to summary |
|---|---|
| private DoubleProperty fromAngle Specifies the start angle value for 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 | |
| start | back to summary |
|---|---|
| private double start | |
| toAngle | back to summary |
|---|---|
| private DoubleProperty toAngle Specifies the stop angle value for this
It is not possible to change
| |
| RotateTransition | back to summary |
|---|---|
| public RotateTransition(Duration duration, Node node) The constructor of | |
| RotateTransition | back to summary |
|---|---|
| public RotateTransition(Duration duration) The constructor of
| |
| RotateTransition | back to summary |
|---|---|
| public RotateTransition() The constructor of | |
| axisProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| byAngleProperty | back to summary |
|---|---|
| public final DoubleProperty byAngleProperty() | |
| durationProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| fromAngleProperty | back to summary |
|---|---|
| public final DoubleProperty fromAngleProperty() | |
| getAxis | back to summary |
|---|---|
| public final Point3D getAxis() | |
| getByAngle | back to summary |
|---|---|
| public final double getByAngle() | |
| getDuration | back to summary |
|---|---|
| public final Duration getDuration() | |
| getFromAngle | back to summary |
|---|---|
| public final double getFromAngle() | |
| getNode | back to summary |
|---|---|
| public final Node getNode() | |
| getTargetNode | back to summary |
|---|---|
| private Node getTargetNode() | |
| getToAngle | back to summary |
|---|---|
| public final double getToAngle() | |
| interpolate | back to summary |
|---|---|
| protected void interpolate(double frac) Implements abstract javafx. Doc from javafx. The method
| |
| nodeProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| setAxis | back to summary |
|---|---|
| public final void setAxis(Point3D value) | |
| setByAngle | back to summary |
|---|---|
| public final void setByAngle(double value) | |
| setDuration | back to summary |
|---|---|
| public final void setDuration(Duration value) | |
| setFromAngle | back to summary |
|---|---|
| public final void setFromAngle(double value) | |
| setNode | back to summary |
|---|---|
| public final void setNode(Node value) | |
| setToAngle | back to summary |
|---|---|
| public final void setToAngle(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.
| |
| toAngleProperty | back to summary |
|---|---|
| public final DoubleProperty toAngleProperty() | |