Here's a simple thing I've come across frequently:

Let's say you want to bidirectionally bind a CheckBox to a boolean
property in a backend class (or any class that contains some kind of
business logic).

That's very easy, except if the backend property is worded in the
"negative" (i.e. the frontend and backend values should be bound such
that if one is true, the other is false).

Since this is a very common scenario, I think it should be supported
out-of-the-box in JavaFX by an addition to the
`javafx.beans.binding.Bindings` class:

    public static void bindInverseBidirectional(
            Property<Boolean> property1,
            Property<Boolean> property2);

The semantics for any two bound properties should be as follows:
1. If one property is `true`, the other property is `false`.
2. If one property is `null`, the other property is also `null`.

Any thoughts?

Reply via email to