public class TypedUIProperties extends Object
UIProperties enhancing the properties with type safety.| Modifier and Type | Class and Description |
|---|---|
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 and Description |
|---|
TypedUIProperties(DockController controller)
Creates a new map.
|
| Modifier and Type | Method and Description |
|---|---|
<V> void |
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. |
<V> V |
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 |
<V> void |
publish(Priority priority,
Path kind,
TypedUIProperties.Type<V> type,
UIBridge<V,UIValue<V>> bridge)
|
<V> void |
put(Priority priority,
String id,
TypedUIProperties.Type<V> type,
V value)
Sets a value of this manager.
|
<T> void |
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.
|
<V> void |
unpublish(Priority priority,
Path kind,
TypedUIProperties.Type<V> type)
|
<V> void |
unpublish(Priority priority,
UIBridge<V,UIValue<V>> bridge)
Removes any occurrence of
bridge from this manager. |
public TypedUIProperties(DockController controller)
controller - the controller that uses this mappublic <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 nullpublic 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)
prioritypriority - the level to questionnullpublic <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 observerIllegalArgumentException - 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 removepublic <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 handled by bridgebridge - the new bridgepublic <V> void unpublish(Priority priority, Path kind, TypedUIProperties.Type<V> type)
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 everywherepublic <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 nullpublic <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 resourcenullpublic void clear(Priority priority)
priority.priority - the priority of the level to removeCopyright © 2017 Docking Frames. All rights reserved.