|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.util.TypedUIProperties
public class TypedUIProperties
A wrapper around an UIProperties enhancing the properties with type safety.
| Nested Class Summary | |
|---|---|
static class |
TypedUIProperties.Type<T>
A class describing a type, different TypedUIProperties.Type objects may share the same Class object
but with different or even equal generic parameters. |
| Constructor Summary | |
|---|---|
TypedUIProperties(DockController controller)
Creates a new map. |
|
| Method Summary | ||
|---|---|---|
|
add(String id,
Path kind,
TypedUIProperties.Type<V> type,
UIValue<V> value)
Adds the listener value to this manager. |
|
void |
clear(Priority priority)
Removes all resources that were stored on the level priority. |
|
|
get(String id,
TypedUIProperties.Type<V> type)
Gets the current value of the resource id with type type. |
|
UIScheme<Object,UIValue<Object>,UIBridge<Object,UIValue<Object>>> |
getScheme(Priority priority)
Gets the scheme which fills missing entries on the level priority |
|
|
publish(Priority priority,
Path kind,
TypedUIProperties.Type<V> type,
UIBridge<V,UIValue<V>> bridge)
Adds an UIBridge to this manager, the bridge will be responsible for UIValues of kind
kind. |
|
|
put(Priority priority,
String id,
TypedUIProperties.Type<V> type,
V value)
Sets a value of this manager. |
|
|
registerType(TypedUIProperties.Type<T> type)
Registers type at this properties. |
|
void |
remove(UIValue<?> value)
Removes the observer value from this manager. |
|
void |
setScheme(Priority priority,
UIScheme<Object,UIValue<Object>,UIBridge<Object,UIValue<Object>>> scheme)
Sets a scheme that is used to fill missing entries. |
|
|
unpublish(Priority priority,
Path kind,
TypedUIProperties.Type<V> type)
Removes the UIBridge that was responsible for handling UIValues of kind kind
and wrapping type type |
|
|
unpublish(Priority priority,
UIBridge<V,UIValue<V>> bridge)
Removes any occurrence of bridge from this manager. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TypedUIProperties(DockController controller)
controller - the controller that uses this map| Method Detail |
|---|
public <T> void registerType(TypedUIProperties.Type<T> type)
type at this properties. Only after type has been registered it
can be used to call the methods of this object. Note that type cannot be removed nor can
it be altered. An attempt to use another TypedUIProperties.Type with the same key will always result in an
exception.
T - the typetype - the new type, not null
public void setScheme(Priority priority,
UIScheme<Object,UIValue<Object>,UIBridge<Object,UIValue<Object>>> scheme)
priority - the level on which the scheme will operatescheme - the new scheme or nullpublic UIScheme<Object,UIValue<Object>,UIBridge<Object,UIValue<Object>>> getScheme(Priority priority)
priority
priority - the level to question
null
public <V> void add(String id,
Path kind,
TypedUIProperties.Type<V> type,
UIValue<V> value)
value to this manager.
V - the type of object value supports.id - the unique identifier of the property to observekind - what kind of object value actually istype - V in a form that can be tested by this managervalue - the new observer
IllegalArgumentException - if type is not known to this manager or if either
of the arguments is nullpublic void remove(UIValue<?> value)
value from this manager.
value - the observer to remove
public <V> void publish(Priority priority,
Path kind,
TypedUIProperties.Type<V> type,
UIBridge<V,UIValue<V>> bridge)
UIBridge to this manager, the bridge will be responsible for UIValues of kind
kind. Please note that UIValues of a sub-kind of kind might be handled
by bridge as well, unless a bridge was installed for that sub-kind.
V - the typepriority - the importance of bridgekind - the kind of UIValues bridge has to handletype - The type of objects hanlded by bridgebridge - the new bridge
public <V> void unpublish(Priority priority,
Path kind,
TypedUIProperties.Type<V> type)
UIBridge that was responsible for handling UIValues of kind kind
and wrapping type type
V - the typepriority - the level on which the bridge workedkind - the kind of UIValue the bridge handledtype - the type of value the UIValues handle
public <V> void unpublish(Priority priority,
UIBridge<V,UIValue<V>> bridge)
bridge from this manager.
V - the type handled by the UIValuespriority - the level on which to search the bridgebridge - the bridge to remove everywhere
public <V> void put(Priority priority,
String id,
TypedUIProperties.Type<V> type,
V value)
V - the typepriority - the level on which to store valueid - the unique identifier of valuetype - the type of valuevalue - the resources itself, can be null
public <V> V get(String id,
TypedUIProperties.Type<V> type)
id with type type.
V - the typeid - the identifier of some resourcetype - the type of the resource
nullpublic void clear(Priority priority)
priority.
priority - the priority of the level to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||