Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1

Chapter 10 ■ User InterfaCe DesIgn InteraCtIvIty: event hanDlIng anD ImagIng effeCts


Next you learned about how events, which allow interactivity, are handled in Java 9 and JavaFX by
using the java.util and javafx.event packages and their EventObject, Event, ActionEvent, and InputEvent
classes. We discussed the different types of InputEvent objects, such as MouseEvents, TouchEvents, and
KeyEvents, and then you implemented your ActionEvent handling to make the (middle three) Instructions,
Legal Disclaimers, and Production Credits sections (Button objects) of your user interface interactive.
Finally, you learned about the javafx.scene.effects package and the dozens of special effects that
JavaFX offers developers. We looked at the Effect superclass and went over how to implement both the
DropShadow class (and object) and the ColorAdjust class (and object) so that you can spruce up your user
interface by adding shadows to your TextFlow objects, improve readability (contrast), and color shift your
top logo digital image asset to match the color schema for each of your Button Control object user interface
designs.
In Chapter 11 , we’re going to take a look at how to configure your JavaFX game to utilize 3D assets. This
involves the Camera superclass and its ParallelCamera and PerspectiveCamera subclasses. We’re also
going to learn how to create light in your 3D Scene so that the Camera object can “see.” We will look at the
LightBase superclass and its AmbientLight and PointLight subclasses, which are specifically provided for
lighting design in 3D Scene applications.

Free download pdf