4Synchronize Data Models—Binding and Triggers
“Associate reverently and as much as you can, with your loftiest thoughts.”
—Henry David Thoreau
We’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 demonstrating 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 ...