Java Reference
In-Depth Information
VLineTo { y: h }
HLineTo { x: mv * 2}
VLineTo { y: 0 }
HLineTo { x: 3 * mv}
VLineTo { y: h/2 }
MoveTo{x: 3 * mv y: h/2}
ArcTo {
radiusX: 20
radiusY: 20
x: 5 * mv y:h/2
PathTransition {
node: circle
duration: 5s
repeatCount: FadeTransition.INDEFINITE autoReverse: true
When the application is executed, the circle moves from the left-hand side of the screen to
the right-hand side, following the path described by the path elements declared in the Path
instance. The next figure shows an outline of the animated path that the circle follows.
How it works...
Using transition-based animation is a simple and easy way to quickly get started with
animation in JavaFX. A transition class provides a canned timeline that animates specific
node properties including position and dimension over a given time period. All transition
classes expose timeline controls by allowing playback, repeat count, and auto-reverse.
Search WWH ::

Custom Search