Generates a bidirectional binding (or "bind with inverse") between two
instances of javafx.collections.ObservableMap
.
A bidirectional binding is a binding that works in both directions. If
two properties a
and b
are linked with a bidirectional
binding and the value of a
changes, b
is set to the same
value automatically. And vice versa, if b
changes, a
is
set to the same value.
Only the content of the two maps is synchronized, which means that both maps are different, but they contain the same elements.
A bidirectional content-binding can be removed with
unbindContentBidirectional(Object, Object)
.
Note: this implementation of a bidirectional binding behaves differently from all other bindings here in two important aspects. A property that is linked to another property with a bidirectional binding can still be set (usually bindings would throw an exception). Secondly bidirectional bindings are calculated eagerly, i.e. a bound property is updated immediately.
<K>
| the type of the key elements | |
<V>
| the type of the value elements | |
map1
| the first ObservableMap<K, V> | |
map2
| the second ObservableMap<K, V> |
Diagram: Bindings