A - the type of wrapper valuepublic abstract class PropertyValue<A> extends Object
DockProperties,
or can be set by the client directly.| Constructor and Description |
|---|
PropertyValue(PropertyKey<A> key)
Creates a new value.
|
PropertyValue(PropertyKey<A> key,
DockController controller)
Creates a new value.
|
| Modifier and Type | Method and Description |
|---|---|
PropertyKey<A> |
getKey()
Gets the key which is used to access the value in
DockProperties. |
A |
getOwnValue()
Gets the value that was set through
setValue(Object). |
DockProperties |
getProperties()
Gets the currently observed properties.
|
A |
getValue()
Gets the current value.
|
boolean |
isAnyValueSet()
Tells whether any value is set.
|
void |
setKey(PropertyKey<A> key)
Sets the key which is used to access the value in
DockProperties. |
void |
setProperties(DockController controller)
Sets the
DockProperties that are read from
controller. |
void |
setProperties(DockProperties properties)
Sets the
DockProperties which should be observed. |
void |
setValue(A value)
Sets the current value.
|
String |
toString() |
protected abstract void |
valueChanged(A oldValue,
A newValue)
Invoked when the value has been changed.
|
public PropertyValue(PropertyKey<A> key)
key - the key used to access the value in DockPropertiespublic PropertyValue(PropertyKey<A> key, DockController controller)
key - the key used to access the value in DockPropertiescontroller - the controller from which properties are to be readpublic void setProperties(DockController controller)
DockProperties that are read from
controller.controller - the properties, can be nullsetProperties(DockProperties)public void setProperties(DockProperties properties)
DockProperties which should be observed.properties - the new properties, can be nullpublic DockProperties getProperties()
nullpublic PropertyKey<A> getKey()
DockProperties.public void setKey(PropertyKey<A> key)
DockProperties.key - the new keypublic A getValue()
setValue(Object) if
the argument was not null, or else the value read from
the properties.null even if the
PropertyKey has a non-null default value.null if no value was found at allpublic A getOwnValue()
setValue(Object).nullpublic boolean isAnyValueSet()
true if not the default value of the key
would be returnedpublic void setValue(A value)
value - the value, null if the value should be read
from the propertiesprotected abstract void valueChanged(A oldValue, A newValue)
oldValue - the new valuenewValue - the old valueCopyright © 2017 Docking Frames. All rights reserved.