public static <K, V> void bindContent (Map<K, V> map1, ObservableMap<? extends K, ? extends V> map2)

Generates a content binding between an javafx.collections.ObservableMap and a java.util.Map.

A content binding ensures that the Map contains the same elements as the ObservableMap. If the content of the ObservableMap changes, the Map will be updated automatically.

Once a Map is bound to an ObservableMap, the Map must not be changed directly anymore. Doing so would lead to unexpected results.

A content-binding can be removed with unbindContent(Object, Object).

Parameters:
<K>     the type of the key elements of the Map
<V>     the type of the value elements of the Map
map1     the Map
map2     the ObservableMap

Exceptions:
NullPointerException     if one of the maps is null
IllegalArgumentException     if map1 == map2

Since:  JavaFX 2.1