Class SimpleMapPropertyEx<K,V>
- java.lang.Object
-
- javafx.beans.binding.MapExpression<K,V>
-
- javafx.beans.property.ReadOnlyMapProperty<K,V>
-
- javafx.beans.property.MapProperty<K,V>
-
- javafx.beans.property.MapPropertyBase<K,V>
-
- javafx.beans.property.SimpleMapProperty<K,V>
-
- org.eclipse.gef.common.beans.property.SimpleMapPropertyEx<K,V>
-
- Type Parameters:
K
- The key type of the wrappedObservableMap
.V
- The value type of the wrappedObservableMap
.
- All Implemented Interfaces:
java.util.Map<K,V>
,javafx.beans.Observable
,javafx.beans.property.Property<javafx.collections.ObservableMap<K,V>>
,javafx.beans.property.ReadOnlyProperty<javafx.collections.ObservableMap<K,V>>
,javafx.beans.value.ObservableMapValue<K,V>
,javafx.beans.value.ObservableObjectValue<javafx.collections.ObservableMap<K,V>>
,javafx.beans.value.ObservableValue<javafx.collections.ObservableMap<K,V>>
,javafx.beans.value.WritableMapValue<K,V>
,javafx.beans.value.WritableObjectValue<javafx.collections.ObservableMap<K,V>>
,javafx.beans.value.WritableValue<javafx.collections.ObservableMap<K,V>>
,javafx.collections.ObservableMap<K,V>
public class SimpleMapPropertyEx<K,V> extends javafx.beans.property.SimpleMapProperty<K,V>
A replacement forSimpleMapProperty
to fix the following JavaFX issues:- Change notifications are fired even when the observed value did not change.(https://bugs.openjdk.java.net/browse/JDK-8089169)
- All listeners were removed when removing one (https://bugs.openjdk.java.net/browse/JDK-8136465): fixed by keeping track of all listeners and ensuring that remaining listeners are re-added when a listener is removed.
-
-
Constructor Summary
Constructors Constructor Description SimpleMapPropertyEx()
Creates a new unnamedSimpleMapPropertyEx
.SimpleMapPropertyEx(java.lang.Object bean, java.lang.String name)
Constructs a newSimpleMapPropertyEx
for the given bean and with the given name.SimpleMapPropertyEx(java.lang.Object bean, java.lang.String name, javafx.collections.ObservableMap<K,V> initialValue)
Constructs a newSimpleMapPropertyEx
for the given bean and with the given name and initial value.SimpleMapPropertyEx(javafx.collections.ObservableMap<K,V> initialValue)
Constructs a new unnamedSimpleMapPropertyEx
that is not related to a bean, with the given initial value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(javafx.beans.InvalidationListener listener)
void
addListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableMap<K,V>> listener)
void
addListener(javafx.collections.MapChangeListener<? super K,? super V> listener)
protected void
fireValueChangedEvent()
protected void
fireValueChangedEvent(javafx.collections.MapChangeListener.Change<? extends K,? extends V> change)
int
hashCode()
void
removeListener(javafx.beans.InvalidationListener listener)
void
removeListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableMap<K,V>> listener)
void
removeListener(javafx.collections.MapChangeListener<? super K,? super V> listener)
-
Methods inherited from class javafx.beans.property.MapPropertyBase
bind, emptyProperty, get, invalidated, isBound, set, sizeProperty, toString, unbind
-
Methods inherited from class javafx.beans.property.MapProperty
bindBidirectional, setValue, unbindBidirectional
-
Methods inherited from class javafx.beans.property.ReadOnlyMapProperty
bindContent, bindContentBidirectional, equals, unbindContent, unbindContentBidirectional
-
Methods inherited from class javafx.beans.binding.MapExpression
asString, clear, containsKey, containsValue, entrySet, get, getSize, getValue, isEmpty, isEqualTo, isNotEqualTo, isNotNull, isNull, keySet, mapExpression, put, putAll, remove, size, valueAt, valueAt, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
SimpleMapPropertyEx
public SimpleMapPropertyEx()
Creates a new unnamedSimpleMapPropertyEx
.
-
SimpleMapPropertyEx
public SimpleMapPropertyEx(java.lang.Object bean, java.lang.String name)
Constructs a newSimpleMapPropertyEx
for the given bean and with the given name.- Parameters:
bean
- The bean this property is related to.name
- The name of the property.
-
SimpleMapPropertyEx
public SimpleMapPropertyEx(java.lang.Object bean, java.lang.String name, javafx.collections.ObservableMap<K,V> initialValue)
Constructs a newSimpleMapPropertyEx
for the given bean and with the given name and initial value.- Parameters:
bean
- The bean this property is related to.name
- The name of the property.initialValue
- The initial value of the property
-
SimpleMapPropertyEx
public SimpleMapPropertyEx(javafx.collections.ObservableMap<K,V> initialValue)
Constructs a new unnamedSimpleMapPropertyEx
that is not related to a bean, with the given initial value.- Parameters:
initialValue
- The initial value of the property
-
-
Method Detail
-
addListener
public void addListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableMap<K,V>> listener)
-
addListener
public void addListener(javafx.beans.InvalidationListener listener)
-
addListener
public void addListener(javafx.collections.MapChangeListener<? super K,? super V> listener)
-
fireValueChangedEvent
protected void fireValueChangedEvent()
-
fireValueChangedEvent
protected void fireValueChangedEvent(javafx.collections.MapChangeListener.Change<? extends K,? extends V> change)
-
hashCode
public int hashCode()
-
removeListener
public void removeListener(javafx.beans.value.ChangeListener<? super javafx.collections.ObservableMap<K,V>> listener)
-
removeListener
public void removeListener(javafx.beans.InvalidationListener listener)
-
-