|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.util.UIProperties<V,U,B>
V
- The kind of values this map containsU
- The kind of observers used to read values from this mapB
- The kind of bridges used to transfer values V
to observers U
public class UIProperties<V,U extends UIValue<V>,B extends UIBridge<V,U>>
A map containing which contains some string-values pairs and so called bridges to modify these values when reading them out.
Constructor Summary | |
---|---|
UIProperties(DockController controller)
Creates a new map. |
Method Summary | |
---|---|
void |
add(java.lang.String id,
Path path,
U value)
Installs a new UIValue . |
void |
clear(Priority priority)
Removes all values that stored under the given priority. |
V |
get(java.lang.String id)
Gets a resource. |
void |
get(java.lang.String id,
Path kind,
U key)
Call UIValue.set(Object) with the matching value that is stored in this
map for id . |
B |
getBridge(Priority priority,
Path path)
Gets the bridge which is stored on level priority for UIValue s
of kind path . |
protected B |
getBridgeFor(Path path)
Searches a bridge that can be used for path . |
DockController |
getController()
Gets the controller in whose realm this map is used. |
UIScheme<V,U,B> |
getScheme(Priority priority)
Gets the UIScheme that is used to fill up missing values in
the level priority . |
boolean |
isObserved(Path path)
Tells whether the bridge with id path is observed by at least one UIValue . |
boolean |
isObserved(java.lang.String id)
Tells whether the value with id id is observed by at least one UIValue . |
boolean |
isStored(B bridge)
Tells whether bridge is stored in this map. |
void |
lockUpdate()
Tells this manager to stall all updates. |
void |
publish(Priority priority,
Path path,
B bridge)
Adds a new bridge between this UIProperties and a set of
UIValue s that have a certain type. |
void |
put(Priority priority,
java.lang.String id,
V resource)
Sets a new resource and informs all UIValue that are observing id about the change. |
void |
remove(U value)
Uninstalls an observer of a resource |
void |
setScheme(Priority priority,
UIScheme<V,U,B> scheme)
Sets or removes an UIScheme for the level priority of this
UIProperties . |
void |
unlockUpdate()
Tells this manager no longer to stall updates. |
void |
unpublish(Priority priority,
B bridge)
Searches for all occurrences of bridge and removes them. |
void |
unpublish(Priority priority,
Path path)
Removes the bridge that handles the UIValue s of kind path . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UIProperties(DockController controller)
controller
- the owner of this mapMethod Detail |
---|
public DockController getController()
null
public void lockUpdate()
UIValue
will
be informed when a color or provider changes.
public void unlockUpdate()
UIValue
s.
public UIScheme<V,U,B> getScheme(Priority priority)
UIScheme
that is used to fill up missing values in
the level priority
.
priority
- some priority
null
setScheme(Priority, UIScheme)
public void setScheme(Priority priority, UIScheme<V,U,B> scheme)
UIScheme
for the level priority
of this
UIProperties
. The scheme will be used to fill missing values of this properties. Since
a "missing resource" cannot be removed, any attempt to delete a resource created by a scheme
must fail.
priority
- the level which will be provided with new values from scheme
.scheme
- the new scheme or null
public void publish(Priority priority, Path path, B bridge)
UIProperties
and a set of
UIValue
s that have a certain type.
priority
- the importance of the new providerpath
- the path for which this bridge should be used.bridge
- the new bridgepublic void unpublish(Priority priority, Path path)
UIValue
s of kind path
. Please note
that bridges created by the current UIScheme
cannot be removed. Also note that the removed bridge
may be replaced by a bridge created by the current UIScheme
.
priority
- the importance of the bridgepath
- the path of the bridgepublic void unpublish(Priority priority, B bridge)
bridge
and removes them. Please note
that bridges created by the current UIScheme
cannot be removed. Also note that the removed bridge
may be replaced by a bridge created by the current UIScheme
.
All UIValue
s that used bridge
are redistributed.
priority
- the importance of the bridgebridge
- the bridge to removepublic B getBridge(Priority priority, Path path)
priority
for UIValue
s
of kind path
.
priority
- the level in which to searchpath
- the kind of the UIValue
s
null
, a bridge that has been published
or a bridge that was created by an UIScheme
public boolean isStored(B bridge)
bridge
is stored in this map.
bridge
- some object to search
true
if bridge
was found anywherepublic boolean isObserved(Path path)
path
is observed by at least one UIValue
.
path
- the name of some UIBridge
path
is observedpublic void add(java.lang.String id, Path path, U value)
UIValue
. The value will be informed about
any change in the resource id
.
id
- the id of the resource that value
will monitorpath
- the kind of the valuevalue
- the new observerpublic void remove(U value)
value
- the observer to removepublic boolean isObserved(java.lang.String id)
id
is observed by at least one UIValue
.
id
- the name of some value
id
is observedprotected B getBridgeFor(Path path)
path
.
path
- the kind of bridge that is searched. First a bridge for
path
will be searched, then for the parent of path
,
and so on...
null
public void put(Priority priority, java.lang.String id, V resource)
UIValue
that are observing id
about the change.
Please note that values created by an UIScheme
cannot be removed, and that a removed value may
be replaced by a value of an UIScheme
.
priority
- the importance of this valueid
- the name of the valueresource
- the new resource, can be null
public V get(java.lang.String id)
id
- the id of the resource
null
put(Priority, String, Object)
public void get(java.lang.String id, Path kind, U key)
UIValue.set(Object)
with the matching value that is stored in this
map for id
.
id
- the unique identifier of the value to readkind
- the kind of value key
iskey
- the destination of the valuepublic void clear(Priority priority)
UIScheme
are
not affected by this call.
priority
- the priority whose elements should be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |