V - the kind of value that is described by the UIValueU - the kind of UIValue used in this transmitterpublic abstract class UITransmitter<V,U extends UIValue<V>> extends Object implements UIBridge<V,U>
UITransmitter listens to some kind of map
and updates some UIValues when the contents of that map change.| Constructor and Description |
|---|
UITransmitter(String... keys)
Creates a new
ColorTransmitter. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String id,
U value) |
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) |
protected void |
set(String id,
V value,
CDockable dockable)
Transmits
value to all UIValues which
listen to the given id and which are associated with dockable. |
void |
set(String id,
V value,
U observer) |
void |
setControl(CControl control)
|
protected abstract void |
update(CDockable dockable,
String key,
V value)
Called when a value in an observed map has changed.
|
public UITransmitter(String... keys)
ColorTransmitter.keys - the keys which should be monitored by this transmitterpublic void setControl(CControl control)
control - the observed control, can be nullprotected abstract V get(V value, String id, U observer)
UITransmitter.value - the original valueid - the key of the valueobserver - the destination for the valueobserverprotected 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 nullprotected abstract CDockable getDockable(U observer)
CDockable which is associated with observer.observer - some observernullprotected void set(String id, V value, CDockable dockable)
value to all UIValues which
listen to the given id and which are associated with dockable.id - the id of the changed valuevalue - the new value, might be nulldockable - the associated dockable, might be nullprotected 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 removedCopyright © 2018. All rights reserved.