public abstract class TabColorTransmitter extends ColorTransmitter
ColorTransmitter
used for TabColor
s.Constructor and Description |
---|
TabColorTransmitter(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 on a
StackDockComponent |
protected abstract Color |
convertFocused(Color source,
String key)
Changes a background color such that it can be used on a
StackDockComponent |
protected abstract Color |
convertSelected(Color source,
String key)
Changes a background color such that it can be used on a
StackDockComponent |
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 . |
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 abstract boolean |
isSelected(String id)
Tells whether
id represents a color that is used on
selected tabs. |
protected void |
update(CDockable dockable,
String key,
Color color)
Called when a value in an observed map has changed.
|
connect, disconnect, getFirstNonNull
add, remove, set, set, setControl
public TabColorTransmitter(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)
StackDockComponent
source
- the original colorkey
- the key for which the color is neededprotected abstract Color convertSelected(Color source, String key)
StackDockComponent
source
- the original colorkey
- the key for which the color is needed, can be one of
the selected or focused kindprotected abstract Color convertFocused(Color source, String key)
StackDockComponent
source
- the original colorkey
- the key for which the color is needed, can only be one
of the focused kindprotected Color get(Color color, String id, DockColor observer)
UITransmitter
UITransmitter
.get
in class UITransmitter<Color,DockColor>
color
- the original valueid
- the key of the valueobserver
- the destination for the valueobserver
protected 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 isSelected(String id)
id
represents a color that is used on
selected tabs.id
- some idtrue
if the color is used on selected tabsprotected 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 tabsprotected 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)
UITransmitter
update
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 null
protected CDockable getDockable(DockColor observer)
UITransmitter
CDockable
which is associated with observer
.getDockable
in class UITransmitter<Color,DockColor>
observer
- some observernull