Transition creates an animation, that changes the filling of a
shape over a duration. This is done by updating the fill
variable of the shape at regular intervals.
It starts from the fromValue if provided else uses the shape
's fill value. (The stroke value has to be a
javafx. in this case).
It stops at the toValue value.
Code Segment Example:
import javafx.scene.shape.*;
import javafx.animation.*;
...
Rectangle rect = new Rectangle (100, 40, 100, 100);
rect.setArcHeight(50);
rect.setArcWidth(50);
FillTransition ft = new FillTransition(Duration.millis(3000), rect, Color.RED, Color.BLUE);
ft.setCycleCount(4);
ft.setAutoReverse(true);
ft.play();
...
Transition, Animation
| Modifier and Type | Field and Description |
|---|---|
| private Shape | |
| private static final Duration | |
| private static final Color | |
| private static final Shape | |
| private static final Color | |
| private ObjectProperty | duration
The duration of this |
| private Color | |
| private ObjectProperty | fromValue
Specifies the start color value for this |
| private ObjectProperty | shape
The target shape of this |
| private Color | |
| private ObjectProperty | toValue
Specifies the stop color value for this |
| Access | Constructor and Description |
|---|---|
| public | FillTransition(Duration
The duration of the duration, Shape FillTransitionThe shape, Color shape which filling will be animatedThe start value of the color-animation fromValue, Color The end value of the color-animation toValue)The constructor of |
| public | FillTransition(Duration
The duration of the duration, Color FillTransitionThe start value of the color-animation fromValue, Color The end value of the color-animation toValue)The constructor of |
| public | FillTransition(Duration
The duration of the duration, Shape FillTransitionThe shape)shape which filling will be animatedThe constructor of |
| public | FillTransition(Duration
The duration of the duration)FadeTransitionThe constructor of |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final Duration | |
| public final Color | |
| public final Shape | |
| private Shape | |
| public final Color | |
| protected void | interpolate(double
The relative position frac)Implements abstract javafx. The method |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final ObjectProperty | |
| pack-priv boolean | |
| pack-priv void | |
| public final ObjectProperty |
| cachedShape | back to summary |
|---|---|
| private Shape cachedShape | |
| DEFAULT_DURATION | back to summary |
|---|---|
| private static final Duration DEFAULT_DURATION | |
| DEFAULT_FROM_VALUE | back to summary |
|---|---|
| private static final Color DEFAULT_FROM_VALUE | |
| DEFAULT_SHAPE | back to summary |
|---|---|
| private static final Shape DEFAULT_SHAPE | |
| DEFAULT_TO_VALUE | back to summary |
|---|---|
| private static final Color DEFAULT_TO_VALUE | |
| duration | back to summary |
|---|---|
| private ObjectProperty<Duration> duration The duration of this
It is not possible to change the Note While the unit of
| |
| end | back to summary |
|---|---|
| private Color end | |
| fromValue | back to summary |
|---|---|
| private ObjectProperty<Color> fromValue Specifies the start color value for this
It is not possible to change
| |
| shape | back to summary |
|---|---|
| private ObjectProperty<Shape> shape The target shape of this
It is not possible to change the target | |
| start | back to summary |
|---|---|
| private Color start | |
| toValue | back to summary |
|---|---|
| private ObjectProperty<Color> toValue Specifies the stop color value for this
It is not possible to change
| |
| FillTransition | back to summary |
|---|---|
| public FillTransition(Duration duration, Shape shape, Color fromValue, Color toValue) The constructor of | |
| FillTransition | back to summary |
|---|---|
| public FillTransition(Duration duration, Color fromValue, Color toValue) The constructor of | |
| FillTransition | back to summary |
|---|---|
| public FillTransition(Duration duration, Shape shape) The constructor of | |
| FillTransition | back to summary |
|---|---|
| public FillTransition(Duration duration) The constructor of
| |
| FillTransition | back to summary |
|---|---|
| public FillTransition() The constructor of | |
| durationProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| fromValueProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| getDuration | back to summary |
|---|---|
| public final Duration getDuration() | |
| getFromValue | back to summary |
|---|---|
| public final Color getFromValue() | |
| getShape | back to summary |
|---|---|
| public final Shape getShape() | |
| getTargetShape | back to summary |
|---|---|
| private Shape getTargetShape() | |
| getToValue | back to summary |
|---|---|
| public final Color getToValue() | |
| interpolate | back to summary |
|---|---|
| protected void interpolate(double frac) Implements abstract javafx. Doc from javafx. The method
| |
| setDuration | back to summary |
|---|---|
| public final void setDuration(Duration value) | |
| setFromValue | back to summary |
|---|---|
| public final void setFromValue(Color value) | |
| setShape | back to summary |
|---|---|
| public final void setShape(Shape value) | |
| setToValue | back to summary |
|---|---|
| public final void setToValue(Color value) | |
| shapeProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| startable | back to summary |
|---|---|
| pack-priv boolean startable(boolean forceSync) Overrides javafx.
| |
| sync | back to summary |
|---|---|
| pack-priv void sync(boolean forceSync) Overrides javafx.
| |
| toValueProperty | back to summary |
|---|---|
| public final ObjectProperty | |