public abstract class ColorTransmitter extends UITransmitter<java.awt.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(java.lang.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 java.awt.Color |
getFirstNonNull(ColorMap map,
java.lang.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(java.lang.String... keys)
ColorTransmitter
.keys
- the keys which should be monitored by this transmitterprotected java.awt.Color getFirstNonNull(ColorMap map, java.lang.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<java.awt.Color,DockColor>
dockable
- the element to observeprotected void disconnect(CDockable dockable)
UITransmitter
dockable
.disconnect
in class UITransmitter<java.awt.Color,DockColor>
dockable
- the element from which a listener should be removed