Game Development Reference
In-Depth Information
The Scene Builder visual layout tool that writes FXML UI design constructs for
you is a WYSIWYG drag and drop interface design tool. All a designer has to do is
drag and drop any of the JavaFX UI controls onto the editing screen from a UI Control
panel that contains every Control class (object) in the javafx.scene.control package
(see Chapter 4 ) . This Scene Builder is integrated into NetBeans 8.0 for easy access and
integration with JavaFX, in case programmers also need to use it to quickly prototype
UI designs for their clients. There is also a stand-alone version of the Scene Builder
tool, at version 2.0, for designers who do not want to work inside the NetBeans IDE.
You can switch back and forth from FXML editing and previewing in real time and
see UI design and layout changes without having to compile the Java application. You
can also apply all CSS styles to the Scene Builder tool and FXML structure in real
time and see the results of those coding changes as well, again, without any Java com-
pilation! In addition, you can add custom UI controls to the UI Control panel library,
using third-party JAR files or FXML definitions.
The Scene Builder Kit API is open source. This lets you customize your own in-
tegrations of Scene Builder's UI panels and controls, allowing you to integrate Scene
Builder into other IDEs, such as Eclipse or IntelliJ IDEA. A rich text TextFlow con-
tainer has recently been added into the GUI component (Control) library, affording
rich text-editing capabilities. With these new capabilities, you can build multiple-
node, rich text constructs that can integrate other UI elements, or new media element
types, with the TextFlow elements.
For you 3D “aficionados,” 3D is also fully supported in the Scene Builder visual
design editor and in FXML. A 3D object can be loaded and even saved out using the
Scene Builder tool, and all of the object's properties can be edited (and viewed) in real
time, using the Inspector panel . It is not yet possible to create from scratch 3D objects
using Scene Builder, and you cannot yet assign or edit complex Mesh or Materials
properties at this time, but I am sure that these features will come, along with the ad-
vanced 3D OpenGL ES power that is scheduled to be added into JavaFX 8.
Next, let's take a look at FXML markup language specifically, at an in-depth level.
After that, you will examine an actual FXML UI definition structure, and you will see
exactly how the current JavaFX application's UI design would be structured using an
FXML UI definition construct. As you will see, FXML makes UI design a lot easier!
FXML Definition: Anatomy of an XML UI Definition
Construct
Search WWH ::




Custom Search