Java Reference
In-Depth Information
4
Synchronize Data
Models—Binding
and Triggers
“Associate reverently and as much as you can,
with your loftiest thoughts.”
—Henry David Thoreau
W e've discussed how JavaFX lends itself to separating the UI design from
program logic. Ultimately though, you'll need to establish relationships between
these two worlds if you want to create an application of any significance. So how
is this association achieved in JavaFX? The answer is through binding . In this
chapter, we'll describe the principle of Java FX binding, explore the semantics of
the bind keyword with various JavaFX expressions, and furnish examples dem-
onstrating how binding can and cannot be used. In addition, as they are in many
ways related, we'll touch on triggers and how they work within JavaFX too.
Binding
It is no mystery that the skill set required by the traditional programmer is often
times vastly different than the graphic designer. Yet, expertise in both areas is
necessary to create effective Rich Internet Applications. JavaFX encourages a
division of labor along these lines such that the graphic designer and program-
mer could—and arguably should—be different individuals, each with different
areas of expertise, working on distinct parts of a problem set. But somewhere
65
 
 
Search WWH ::




Custom Search