|
||||||||||
| 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.
The map uses a Priority based system, allowing clients to override
behavior of themes or set default values in case a theme does not set one.
| Constructor Summary | |
|---|---|
DockProperties(DockController controller)
Creates a new map. |
|
| Method Summary | ||
|---|---|---|
|
addListener(PropertyKey<A> key,
DockPropertyListener<A> listener)
Adds a listener that will be informed whenever the value accessed through key changes. |
|
|
finalize(PropertyKey<A> key)
Ensures that the value behind key will never be
changed. |
|
|
get(PropertyKey<A> key)
Gets the value accessed by key. |
|
|
get(PropertyKey<A> key,
Priority priority)
Gets the value of key for the given priority. |
|
DockController |
getController()
Gets the owner of this DockProperties. |
|
|
isSet(PropertyKey<A> key)
Tells whether there is value set for key. |
|
|
isSet(PropertyKey<A> key,
Priority priority)
Tells whether there is value set for key with priority. |
|
|
removeListener(PropertyKey<A> key,
DockPropertyListener<A> listener)
Removes an earlier added listener. |
|
|
set(PropertyKey<A> key,
A value)
Sets a value. |
|
|
set(PropertyKey<A> key,
A value,
Priority priority)
Sets a value. |
|
|
setOrRemove(PropertyKey<A> key,
A value,
Priority priority)
Either sets the property key to value or
set the default value for key. |
|
void |
unset(PropertyKey<?> key)
Tells the entry key that the user has never set its value. |
|
void |
unset(PropertyKey<?> key,
Priority priority)
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(DockController controller)
controller - the owner of this map| Method Detail |
|---|
public DockController getController()
DockProperties.
null
public <A> void set(PropertyKey<A> key,
A value)
set( key, value, Priority.CLIENT ).
A - the type of the valuekey - the key to access the valuevalue - the value, can be null
public <A> void set(PropertyKey<A> key,
A value,
Priority priority)
A - the type of the valuekey - the key to access the valuevalue - the value, can be nullpriority - the priority of the new valuepublic <A> void finalize(PropertyKey<A> key)
key will never be
changed. Should be used with care: any attempt to set the value afterwards
will be responded with an IllegalStateException. Most times it
is much better to just use Priority.CLIENT to mark some setting
as important.
A - the type of the valuekey - the key to protect
public <A> void setOrRemove(PropertyKey<A> key,
A value,
Priority priority)
key to value or
set the default value for key.
A - the type of the valuekey - the key to access the valuevalue - the new value, if null then the default
value will be setpriority - the priority of the value to removepublic void unset(PropertyKey<?> key)
key that the user has never set its value.
This is equivalent to calling unset( key, Priority.CLIENT ).
key - the key to access the entry
public void unset(PropertyKey<?> key,
Priority priority)
key that the user has never set its value.
Also removes the old value of the entry.
key - the key to access the entrypriority - the priority for which to remove the valuepublic <A> A get(PropertyKey<A> key)
key. If the value in the
properties is not set, then the default
value is returned.
A - the type of the valuekey - the key to search
null
public <A> A get(PropertyKey<A> key,
Priority priority)
key for the given priority.
A - the kind of valuekey - some key, not nullpriority - the priority, not null
null even if get(PropertyKey)
returns a non-null value
public <A> boolean isSet(PropertyKey<A> key,
Priority priority)
key with priority.
A - the kind of valuekey - the key to checkpriority - the priority for which something might be set
true if there is a value setpublic <A> boolean isSet(PropertyKey<A> key)
key.
A - the kind of valuekey - the key to check
true if there is a value set
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 listener
public <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 | |||||||||