public abstract class ColorTransmitter extends UITransmitter<Color,DockColor> implements ColorBridge
ColorTransmitter observes some ColorMaps
and transmits some Colors of these maps to a set of DockColors.| 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, updatepublic 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 nullprotected void connect(CDockable dockable)
UITransmitterdockable 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)
UITransmitterdockable.disconnect in class UITransmitter<Color,DockColor>dockable - the element from which a listener should be removedCopyright © 2018. All rights reserved.