JavaFX is a scripting language which provides built-in properties for manipulating objects within a 2D coordinate system. A competing technology to Microsoft's Silverlight, JavaFX provides the tools to fill and pen stroke colors, and create special effects, shapes and lines. It also manipulates images and play videos and sound and defines animations that affect objects over time. This complete introduction for any level doesn't bury you with details. It starts quickly with an introduction to the power of JavaFX key features--scene node graphs, nodes as components, the coordinate system, layout options, colors and gradients, custom classes with inheritance, animation, binding, and event handlers. It then shows step-by-step how these features could be used in a real JavaFX application and will help an application look professionally designed. Commissioned by JavaFX product team and reviewed by renowned Java author, Brian Goetz, this guide is intended as the first and most accessible book for people new to JavaFX.
- The Andersons are working directly with the JavaFX team at Sun for a complete and authoritative guide
- Gets you started on building rich Web apps quickly without having to sort through unnecessary details or search the Web for answers
- Focuses on most useful features and shows how to build apps that tap the full potential of JavaFX
Chapter 1 gets you started with JavaFX. We show you how to download JavaFX and begin building projects with the NetBeans IDE. (We use NetBeans to build our examples, but you can also use Eclipse.)
Chapter 2 gives you a broad overview of JavaFX. It takes you through an example (a Guitar Tuner), pointing out how things are done with JavaFX. If you want to get a “feel” for the language, this chapter introduces you to many trademark JavaFX features.
Chapter 3 through Chapter 5 are “reference-oriented” chapters. Chapter 3 describes the JavaFX language, Chapter 4 describes graphical objects, and Chapter 5 discusses user interface components. These chapters are organized with small examples to help you find information quickly (how do I bind an object or generate a sequence with a for loop?). The language chapter covers everything from JavaFX built-in types to mixin inheritance. Graphical objects are the basic JavaFX shapes you use to build scene graphs and layout objects (islands in the sun, for example). The components chapter shows you the JavaFX Swing components and the JavaFX “native” UI components. We also show you how to build custom UI components in a more advanced section.
Chapter 6 shows you how to design and structure a JavaFX application. It introduces a building-block approach with a nod towards object oriented design principles.
Chapter 7 is all about JavaFX animation and timelines. JavaFX animation is both powerful and flexible. Transitions are “pre-packaged high-level” animations that help build straightforward motions quickly, such as fade-ins and fade-outs, scaling, and moving.
Chapter 8 discusses viewing and manipulating images. One example shows you how to design an animated photo carousel.
Chapter 9 covers web services. JavaFX provides two important utility classes that make it easier to work with web services. An HttpRequest class handles asynchronous web requests and a PullParser class simplifies processing the response data. We take you through several Flickr-based web service API calls.
Chapter 10 discusses the JavaFX mobile environment and explores the differences between desktop JavaFX and the JavaFX mobile runtime. We discuss guidelines for targeting mobile devices and how to make an application mobile-friendly.