7. Animation

If the scene graph is the central metaphor in JavaFX for specifying graphical objects, then animation is its metaphor for doing things. Animation is the heart and soul of JavaFX. Simply, it brings objects to life. With animation, you give motion to the JavaFX scene graph.

JavaFX provides a rich palette for animation. With Timelines, you can build just about any animation you need. Timelines provide a range of properties that let you specify how an object’s properties might change over time. With binding, you can manipulate script-level variables that consequently change an object’s bound properties. Timelines also let you specify interpolators, rate, time, repeat count, new values, and actions. You can even nest timelines and create ...

Get Essential JavaFX™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.