|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.util.PropertyValue<A>
A - the type of wrapper valuepublic abstract class PropertyValue<A>
A wrapper for a value which is either read from DockProperties,
or can be set by the client directly.
| Constructor Summary | |
|---|---|
PropertyValue(PropertyKey<A> key)
Creates a new value. |
|
PropertyValue(PropertyKey<A> key,
DockController controller)
Creates a new value. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyValue(PropertyKey<A> key)
key - the key used to access the value in DockProperties
public PropertyValue(PropertyKey<A> key,
DockController controller)
key - the key used to access the value in DockPropertiescontroller - the controller from which properties are to be read| Method Detail |
|---|
public 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 properties
protected abstract void valueChanged(A oldValue,
A newValue)
oldValue - the new valuenewValue - the old valuepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||