|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.util.DockProperties
public class DockProperties
A set of properties that are used at different places all over the framework. No component should expect that there are any entries in this map.
Constructor Summary | |
---|---|
DockProperties()
|
Method Summary | ||
---|---|---|
|
addListener(PropertyKey<A> key,
DockPropertyListener<A> listener)
Adds a listener that will be informed whenever the value accessed through key changes. |
|
|
get(PropertyKey<A> key)
Gets the value accessed by key . |
|
|
removeListener(PropertyKey<A> key,
DockPropertyListener<A> listener)
Removes an earlier added listener. |
|
|
set(PropertyKey<A> key,
A value)
Sets a value. |
|
void |
toDefault(PropertyKey<?> key)
Tells the entry key that the user has never set its value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DockProperties()
Method Detail |
---|
public <A> void set(PropertyKey<A> key, A value)
A
- the type of the valuekey
- the key to access the valuevalue
- the value, can be null
public void toDefault(PropertyKey<?> key)
key
that the user has never set its value.
Also removes the old value of the entry.
key
- the key to access the entrypublic <A> A get(PropertyKey<A> key)
key
. If the value in the
properties is null
, then the default
value is returned.
A
- the type of the valuekey
- the key to search
null
public <A> void addListener(PropertyKey<A> key, DockPropertyListener<A> listener)
key
changes.
A
- the type of the valuekey
- the key that accesses the valuelistener
- the new listenerpublic <A> void removeListener(PropertyKey<A> key, DockPropertyListener<A> listener)
A
- the type of value observed by the listenerkey
- the key to access the observed entrylistener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |