T - Type of property value.public abstract class AbstractReadableProperty<T> extends Object implements ReadableProperty<T>
ReadableProperty.
Sub-classes should call the notifyListeners(Object, Object) method whenever the property value changes.
Note that this class is not thread-safe.| Constructor and Description |
|---|
AbstractReadableProperty() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ReadablePropertyChangeListener<T> listener)
Adds a
WritableProperty as a slave. |
protected void |
notifyListeners(T oldValue,
T newValue)
Updates the slaved writable properties with this property's value.
|
void |
removeChangeListener(ReadablePropertyChangeListener<T> listener)
Removes the
WritableProperty. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetValuepublic void addChangeListener(ReadablePropertyChangeListener<T> listener)
ReadablePropertyWritableProperty as a slave.
Anytime readable property value changes, the slaved WritablePropertys will also be set.addChangeListener in interface ReadableProperty<T>listener - WritableProperty to be slaved.ReadableProperty.addChangeListener(ReadablePropertyChangeListener)public void removeChangeListener(ReadablePropertyChangeListener<T> listener)
ReadablePropertyWritableProperty.removeChangeListener in interface ReadableProperty<T>listener - WritableProperty that should no longer be slaved.ReadableProperty.removeChangeListener(ReadablePropertyChangeListener)protected void notifyListeners(T oldValue, T newValue)
ReadableProperty.getValue()Copyright © 2013. All Rights Reserved.