|
||||||||||
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.
Nested Class Summary | |
---|---|
private class |
DockProperties.Entry<A>
An entry that contains key, listeners and a value. |
Field Summary | |
---|---|
private java.util.Map<PropertyKey<?>,DockProperties.Entry<?>> |
map
the map of values |
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. |
|
private void |
check(DockProperties.Entry<?> entry)
Checks whether entry has to be stored any longer. |
|
|
get(PropertyKey<A> key)
Gets the value accessed by key . |
|
private
|
getEntry(PropertyKey<A> key,
boolean secure)
Gets the entry for key . |
|
|
removeListener(PropertyKey<A> key,
DockPropertyListener<A> listener)
Removes an earlier added listener. |
|
|
set(PropertyKey<A> key,
A value)
Sets a value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Map<PropertyKey<?>,DockProperties.Entry<?>> map
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 <A> A get(PropertyKey<A> key)
key
.
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 removeprivate <A> DockProperties.Entry<A> getEntry(PropertyKey<A> key, boolean secure)
key
.
A
- the type of the entrykey
- the name of the entrysecure
- true
if null
is not a valid
result.
null
, but only if secure
is false
private void check(DockProperties.Entry<?> entry)
entry
has to be stored any longer.
entry
- the entry that may be deleted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |