Interesting idea.

There is a case I have been curious about and wonder what the best
practices are for it.  Suppose you have a case when you are changing
multiple different properties that will be used in a single calculation.
 You want to deal with a single change to all of them in one go.  E.g.
imagine you have an "area" property that is bound to both "width" and
"height".  You want to write code like:


and have only ONE recalculation of the area property happen.  Currently the
way bindings work the area will be calculated twice.  The intermediate
calculation is really not a value that you ever want to observe.

Are there helpers for this sort of situation?  Are there guidelines in the
JavaFX docs somewhere?



On Sat, Dec 14, 2013 at 11:54 PM, Tomas Mikula <>wrote:

> Hello,
> I just published a small extension of javafx bindings and properties
> that can help you reduce redundant recalculations.
> They provide two additional methods:
> public void block();
> public void release();
> Call p.block() when you suspect your actions will lead to multiple
> invalidations of p, and call p.release() when you are done and want to
> deliver a single invalidation notification to p's observers.
> Regards,
> Tomas

Reply via email to