|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.common.intern.ui.UITransmitter<V,U>
V
- the kind of value that is described by the UIValue
U
- the kind of UIValue
used in this transmitterpublic abstract class UITransmitter<V,U extends UIValue<V>>
An UITransmitter
listens to some kind of map
and updates some UIValue
s when the contents of that map change.
Constructor Summary | |
---|---|
UITransmitter(String... keys)
Creates a new ColorTransmitter . |
Method Summary | |
---|---|
void |
add(String id,
U value)
Adds a new UIValue that gets its resource from this bridge. |
protected abstract void |
connect(CDockable dockable)
Adds a listener to dockable and calls
update(CDockable, String, Object) whenever some value
needs an update. |
protected abstract void |
disconnect(CDockable dockable)
Removes a listener from dockable . |
protected abstract V |
get(V value,
String id,
U observer)
Called when a value needs to be set whose key has been registered at this UITransmitter . |
protected abstract CDockable |
getDockable(U observer)
Gets the CDockable which is associated with observer . |
void |
remove(String id,
U value)
Removes a value from this bridge. |
protected void |
set(String id,
V value,
CDockable dockable)
Transmits value to all UIValue s which
listen to the given id and which are associated with dockable . |
void |
set(String id,
V value,
U observer)
Called by the UIProperties when one resource or UIValue
has been exchanged. |
void |
setControl(CControl control)
Sets the CControl which should be observed for new CDockable s
by this transmitter. |
protected abstract void |
update(CDockable dockable,
String key,
V value)
Called when a value in an observed map has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UITransmitter(String... keys)
ColorTransmitter
.
keys
- the keys which should be monitored by this transmitterMethod Detail |
---|
public void add(String id, U value)
UIBridge
UIValue
that gets its resource from this bridge.
add
in interface UIBridge<V,U extends UIValue<V>>
id
- the id of the resource the new value needsvalue
- a value that can be modified by this bridepublic void remove(String id, U value)
UIBridge
remove
in interface UIBridge<V,U extends UIValue<V>>
id
- the id of the resource the value neededvalue
- the value that is no longer in usepublic void setControl(CControl control)
CControl
which should be observed for new CDockable
s
by this transmitter.
control
- the observed control, can be null
public void set(String id, V value, U observer)
UIBridge
UIProperties
when one resource or UIValue
has been exchanged. Normally an UIBridge
can just
call UIValue.set(Object)
with the argument value
.
set
in interface UIBridge<V,U extends UIValue<V>>
id
- the identifier of the resourcevalue
- the new resource, can be null
observer
- the value that is affected by the changeprotected abstract V get(V value, String id, U observer)
UITransmitter
.
value
- the original valueid
- the key of the valueobserver
- the destination for the value
observer
protected abstract void update(CDockable dockable, String key, V value)
dockable
- the owner of the mapkey
- the name of the changed valuevalue
- the new value in the map, can be null
protected abstract CDockable getDockable(U observer)
CDockable
which is associated with observer
.
observer
- some observer
null
protected void set(String id, V value, CDockable dockable)
value
to all UIValue
s which
listen to the given id and which are associated with dockable
.
id
- the id of the changed valuevalue
- the new value, might be null
dockable
- the associated dockable, might be null
protected abstract void connect(CDockable dockable)
dockable
and calls
update(CDockable, String, Object)
whenever some value
needs an update.
dockable
- the element to observeprotected abstract void disconnect(CDockable dockable)
dockable
.
dockable
- the element from which a listener should be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |