public abstract class TitleColorTransmitter extends ColorTransmitter
TitleColors with the common-project
and the ColorMap of the CDockables.| Constructor and Description |
|---|
TitleColorTransmitter(ColorManager manager,
String... keys)
Creates a new transmitter.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Color |
convert(Color source,
String key)
Changes a background color such that it can be used for
key. |
protected abstract Color |
convertFocused(Color source,
String key)
Changes a background color such that it can be used for
key. |
protected Color |
get(Color color,
String id,
CDockable dockable)
Searches the color
id for dockable. |
protected Color |
get(Color color,
String id,
DockColor observer)
Called when a value needs to be set whose key has been registered at
this
UITransmitter. |
protected CDockable |
getDockable(DockColor observer)
Gets the
CDockable which is associated with observer. |
String[] |
getKeys()
Gets the list of keys for which this transmitter works.
|
protected abstract boolean |
isFocused(String id)
Tells whether
id represents a color that is used on
focused tabs. |
protected abstract boolean |
isForeground(String id)
Tells whether
id represents a color that is used for
the foreground. |
protected void |
update(CDockable dockable,
String key,
Color color)
Called when a value in an observed map has changed.
|
connect, disconnect, getFirstNonNulladd, remove, set, set, setControlpublic TitleColorTransmitter(ColorManager manager, String... keys)
keys - the keys of the colors that are handled by this transmittermanager - the source of all colorsprotected abstract Color convert(Color source, String key)
key.source - the original colorkey - the key for which the color is needednullprotected abstract Color convertFocused(Color source, String key)
key.source - the original colorkey - the key for which the color is needed, can only be one
of the focused kindnullprotected abstract boolean isForeground(String id)
id represents a color that is used for
the foreground.id - some idtrue if the color is used in the foregroundprotected abstract boolean isFocused(String id)
id represents a color that is used on
focused tabs.id - some idtrue if the color is used on focused tabspublic String[] getKeys()
protected Color get(Color color, String id, DockColor observer)
UITransmitterUITransmitter.get in class UITransmitter<Color,DockColor>color - the original valueid - the key of the valueobserver - the destination for the valueobserverprotected CDockable getDockable(DockColor observer)
UITransmitterCDockable which is associated with observer.getDockable in class UITransmitter<Color,DockColor>observer - some observernullprotected Color get(Color color, String id, CDockable dockable)
id for dockable.color - the color to be returned if the search for id fails.id - the identifier of the color to searchdockable - the element for which the color will be usedprotected void update(CDockable dockable, String key, Color color)
UITransmitterupdate in class UITransmitter<Color,DockColor>dockable - the owner of the mapkey - the name of the changed valuecolor - the new value in the map, can be nullCopyright © 2018. All rights reserved.