Java Reference
In-Depth Information
4. Now, export the Photoshop artwork to the JavaFX FXZ file format. Select, menu item
File | Automate | Save for JavaFX to start the JavaFX export plugin from within
Photoshop. This will bring up the plugin's preview screen. Save the FXZ file to a
location inside your JavaFX application's source path for easy access. For this recipe,
the exported FXZ file is saved in the project's source directory at ch08/source-
code/src/fxzdemo/SymbolsPS.fxz .
How it works...
In this recipe, we have discussed how to use the JavaFX Production Suite's plugin to export
graphics objects from Adobe Photoshop to JavaFX. The plugin produces a single JavaFX FXZ
file containing all graphical assets exported from the Photoshop PSD file. Let's see how this
file format works.
F The FXZ file. —when you export your graphics objects from Photoshop using the
Production Suite plugin, the resulting FXZ file is a zip-compressed file that contains:
Graphic assets exported from the original PSD file such as the
images generated from each layer of the Photoshop file
Any embeddable fonts that are used
A data file with an FXD extension (see There's more ahead)
F Generated PNG iles —each layer in your Photoshop file is rasterized down into a
separate PNG image file. Photoshop layers with the jfx: prefix in their names will
be exported using the the name provided. For instance, the Photoshop layer named
jfx:target will be exported as an image named target.png .
F Text objects —text layers will be rasterized down to PNG files by default, or can
optionally be exported as JavaFX Text nodes, which allows direct programmatic
manipulation of the text content in JavaFX.
There's more...
Once the FXZ file is created, you can preview the exported file in NetBeans or using Production
Suite's Viewer tool. Both NetBeans and Viewer give a device-dependent preview of the
exported graphics objects embedded in the FXZ file.
 
Search WWH ::




Custom Search