public abstract class ColorTransmitter extends UITransmitter<Color,DockColor> implements ColorBridge
ColorTransmitter
observes some ColorMap
s
and transmits some Color
s of these maps to a set of DockColor
s.Constructor and Description |
---|
ColorTransmitter(String... keys)
Creates a new
ColorTransmitter . |
Modifier and Type | Method and Description |
---|---|
protected void |
connect(CDockable dockable)
Adds a listener to
dockable and calls
UITransmitter.update(CDockable, String, Object) whenever some value
needs an update. |
protected void |
disconnect(CDockable dockable)
Removes a listener from
dockable . |
protected Color |
getFirstNonNull(ColorMap map,
String... keys)
Gets the first non-
null color of map that
matches a given key. |
add, get, getDockable, remove, set, set, setControl, update
public ColorTransmitter(String... keys)
ColorTransmitter
.keys
- the keys which should be monitored by this transmitterprotected Color getFirstNonNull(ColorMap map, String... keys)
null
color of map
that
matches a given key.map
- a map of colorskeys
- some keys that will be read from index 0 upward.Color
that is not null
or null
protected void connect(CDockable dockable)
UITransmitter
dockable
and calls
UITransmitter.update(CDockable, String, Object)
whenever some value
needs an update.connect
in class UITransmitter<Color,DockColor>
dockable
- the element to observeprotected void disconnect(CDockable dockable)
UITransmitter
dockable
.disconnect
in class UITransmitter<Color,DockColor>
dockable
- the element from which a listener should be removed