Java Reference
In-Depth Information
focuses on the JavaFX programmer and what he or she needs to do to use those
objects in an application.
JavaFX Production Suite
The JavaFX Production Suite is a set of tools for converting graphics to a format
that can be used for JavaFX applications. You can download the JavaFX Produc-
tion Suite from the JavaFX Web site ( http://www.javafx.com) and it supports
Microsoft Windows XP, Service Pack 2, Microsoft Vista, and Macintosh OS X
10.4+ on Intel. If you already have Adobe Illustrator CS3 or Adobe Photoshop
CS3 installed, simply execute the binary installer for JavaFX Production Suite
and the appropriate Adobe plug-ins will be installed on your system. These plug-
ins allow you to export from the respective Adobe products to a format that can
be processed by JavaFX. Let's see how this works.
In our example, we want to create an animation of a solar eclipse. In this anima-
tion, there is, of course, the Moon in its orbit; but, also, the Sun goes through
several phase changes as the eclipse approaches totality and subsequently returns
to normal. We will use this example in Chapter 7 when we explain how to imple-
ment animations in JavaFX. However, let's first look at the graphical assets
required for this.
Adobe Illustrator CS3
Using Adobe Illustrator CS3, we need two backgrounds: one is the blue sky as
normally seen in daylight and the second is a dark sky with stars. As the eclipse
progresses to totality, the blue daylight sky will fade out while the dark sky will
fade in, peaking at totality, before the process reverses itself. To accomplish this,
you need to create a separate layer for each background: one called jfx:bluesky
and the other jfx:darksky. The naming convention jfx :layerName will help later
when we export the layers to JavaFX.
Graphical layers are discreet graphical assets that can be layered on top of each
other to provide a combined visual effect. This is analogous to using a clear film
representing each layer. Each film will contain its graphical components so that
when you lay one film over another you get a combined visual. For animations,
you can take a foreground layer on top of a background layer and then, over
time, move the foreground layer across the background layer.
The jfx:bluesky and jfx:darksky layers are illustrated in Figures 2.1 and 2.2.
These figures are available in full color at our Web site, http://jfxbook.com.
 
 
Search WWH ::




Custom Search