简体   繁体   中英

Is there a way to get all bindings of a JavaFX property?

The title says it all, but to elaborate: if I add one or more bindings to some property, is there a way to get and examine them later? I would expect there is getBindings() method in the Property class, but obviously there isn't.

While looking for a solution for this, I came to realization that getBindings() method probably doesn't exist because there is no elegant way to implement it, due to Binding being a parameterized type. Workaround is to track bindings yourself, but it is difficult to do without resorting to raw types. One way is to use Mediator pattern . BTW, the same goes for listeners and event handlers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM