java.lang.Object
javafx.beans.binding.MapExpression<K,V>
 
javafx.beans.property.ReadOnlyMapProperty<K,V>
 
javafx.beans.property.MapProperty<K,V> 
- Type Parameters:
- K- the type of the key elements of the- Map
- V- the type of the value elements of the- Map
- All Implemented Interfaces:
- Map<K,,- V> - Observable,- Property<ObservableMap<K,,- V>> - ReadOnlyProperty<ObservableMap<K,,- V>> - ObservableMapValue<K,,- V> - ObservableObjectValue<ObservableMap<K,,- V>> - ObservableValue<ObservableMap<K,,- V>> - WritableMapValue<K,,- V> - WritableObjectValue<ObservableMap<K,,- V>> - WritableValue<ObservableMap<K,,- V>> - ObservableMap<K,- V> 
- Direct Known Subclasses:
- MapPropertyBase
public abstract class MapProperty<K,V> 
extends ReadOnlyMapProperty<K,V>
implements Property<ObservableMap<K,V>>, WritableMapValue<K,V>   
This class provides a full implementation of a 
Property wrapping an
 ObservableMap.
 The value of a MapProperty can be get and set with ObservableObjectValue.get(),
 MapExpression.getValue(), WritableObjectValue.set(Object), and setValue(javafx.collections.ObservableMap).
 A property can be bound and unbound unidirectional with
 Property.bind(javafx.beans.value.ObservableValue) and Property.unbind(). Bidirectional bindings
 can be created and removed with bindBidirectional(Property) and
 unbindBidirectional(Property).
 The context of a MapProperty can be read with ReadOnlyProperty.getBean()
 and ReadOnlyProperty.getName().- Since:
- JavaFX 2.1
- See Also:
- 
Property SummaryProperties declared in class javafx.beans.binding.MapExpressionempty, size
- 
Nested Class Summary
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbindBidirectional(Property<ObservableMap<K, V>> other) Create a bidirectional binding between thisPropertyand another one.voidsetValue(ObservableMap<K, V> v) Set the wrapped value.toString()Returns a string representation of thisMapPropertyobject.voidunbindBidirectional(Property<ObservableMap<K, V>> other) Removes a bidirectional binding between thisPropertyand another one.Methods declared in class javafx.beans.property.ReadOnlyMapPropertybindContent, bindContentBidirectional, equals, hashCode, unbindContent, unbindContentBidirectionalMethods declared in class javafx.beans.binding.MapExpressionasString, clear, containsKey, containsValue, emptyProperty, entrySet, get, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, keySet, mapExpression, put, putAll, remove, size, sizeProperty, valueAt, valueAt, valuesMethods declared in class java.lang.Objectclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods declared in interface java.util.Mapclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods declared in interface javafx.beans.ObservableaddListener, removeListener, subscribeMethods declared in interface javafx.collections.ObservableMapaddListener, removeListenerMethods declared in interface javafx.beans.value.ObservableObjectValuegetMethods declared in interface javafx.beans.value.ObservableValueaddListener, flatMap, getValue, map, orElse, removeListener, subscribe, subscribe, whenMethods declared in interface javafx.beans.property.ReadOnlyPropertygetBean, getNameMethods declared in interface javafx.beans.value.WritableObjectValueget, setMethods declared in interface javafx.beans.value.WritableValuegetValue
- 
Constructor Details- 
MapPropertypublic MapProperty()Creates a defaultMapProperty.
 
- 
- 
Method Details- 
setValueSet the wrapped value.- Specified by:
- setValuein interface- WritableValue<K>
- Parameters:
- v- The new value
 
- 
bindBidirectionalCreate a bidirectional binding between thisPropertyand another one. Bidirectional bindings exists independently of unidirectional bindings. So it is possible to add unidirectional binding to a property with bidirectional binding and vice-versa. However, this practice is discouraged.It is possible to have multiple bidirectional bindings of one Property. JavaFX bidirectional binding implementation use weak listeners. This means bidirectional binding does not prevent properties from being garbage collected. - Specified by:
- bindBidirectionalin interface- Property<K>
- Parameters:
- other- the other- Property
 
- 
unbindBidirectionalRemoves a bidirectional binding between thisPropertyand another one. If no bidirectional binding between the properties exists, calling this method has no effect. It is possible to unbind by a call on the second property. This code will work:property1.bindBidirectional(property2); property2.unbindBidirectional(property1);- Specified by:
- unbindBidirectionalin interface- Property<K>
- Parameters:
- other- the other- Property
 
- 
toStringReturns a string representation of thisMapPropertyobject.- Overrides:
- toStringin class- ReadOnlyMapProperty<K,- V> 
- Returns:
- a string representation of this MapPropertyobject.
 
 
-