Question

How is the bind operator implemented in JavaFX? What happens behind the scenes? Does every variable in JavaFX implement some kind of observer API so that listeners can attach to it or is it a trick in the VM?

Was it helpful?

Solution

It's definitely not a trick in the VM. For some parts of the bind functionality the JavaFX complier simply generates code and some of the code are calls to a runtime component called Location. Location maintains dependencies and variable invalidation and binds. You can browse the sources on kenai if you like. Looking through de-compiled javafx classes might help your understanding too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top