Java Reference
In-Depth Information
at specified intervals, represented by time durations, javafx.lang.Duration .
These key frames may contain key values, javafx.animation.KeyValue , that
represent the end state of the specified application values such as position, opacity,
and color, and may also include actions that execute when the key time occurs.
Key values also contain a declaration of which mathematical formula, or interpo-
lator, javafx.animation.Interpolator , should be used in the tweening process.
Figure 7.1 demonstrates the key frames within a timeline that mimics the rise
and setting of the sun or moon. Each disc is at a specific location at the respec-
tive key frame time. At the start, 0 seconds, the disc is on the left hand side at its
lowest position. At 200 seconds, the next key position is a little further right and
higher. At 500 seconds, the disc shape is at its zenith. At 800 seconds, the disc is
lower and to the right, then at 1,000 seconds, it is setting off the horizon. In the
actual animation, the disc smoothly moves in an arc from left to right, over 1,000
seconds.
The timeline represents the animation sequence, and can be started, paused,
resumed, and stopped. It is also possible to choose the point in time to start or
resume the animation, which enables an application to implement features found
in a Videocassette Recorder (VCR) or Digital Video Recorder (DVR) such as
play, pause, stop, rewind, and fast forward.
Figure 7.1
Timeline Showing KeyFrame Positions of a Moving Disc Shape
Search WWH ::




Custom Search