public abstract class MinimizedButtonColorTransmitter extends ColorTransmitter
Constructor and Description |
---|
MinimizedButtonColorTransmitter(ColorManager manager,
java.lang.String... keys)
Creates a new transmitter.
|
Modifier and Type | Method and Description |
---|---|
protected abstract java.awt.Color |
convert(java.awt.Color source,
java.lang.String key)
Changes a background color such that it can be used for
key . |
protected abstract java.awt.Color |
convertFocused(java.awt.Color source,
java.lang.String key)
Changes a background color such that it can be used for
key . |
protected abstract java.awt.Color |
convertSelected(java.awt.Color source,
java.lang.String key)
Changes a background color such that is can be used for
key . |
protected java.awt.Color |
get(java.awt.Color color,
java.lang.String id,
CDockable dockable)
Searches the color
id for dockable . |
protected java.awt.Color |
get(java.awt.Color color,
java.lang.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 . |
java.lang.String[] |
getKeys()
Gets the list of keys for which this transmitter works.
|
protected abstract boolean |
isFocused(java.lang.String id)
Tells whether
id represents a color that is used on
focused titles. |
protected abstract boolean |
isForeground(java.lang.String id)
Tells whether
id represents a color that is used for
the foreground. |
protected abstract boolean |
isSelected(java.lang.String id)
Tells whether
id represents a color that is used
on a selected title. |
protected void |
update(CDockable dockable,
java.lang.String key,
java.awt.Color color)
Called when a value in an observed map has changed.
|
connect, disconnect, getFirstNonNull
add, remove, set, set, setControl
public MinimizedButtonColorTransmitter(ColorManager manager, java.lang.String... keys)
keys
- the keys of the colors that are handled by this transmittermanager
- the source of all colorsprotected abstract java.awt.Color convert(java.awt.Color source, java.lang.String key)
key
.source
- the original colorkey
- the key for which the color is needednull
protected abstract java.awt.Color convertFocused(java.awt.Color source, java.lang.String key)
key
.source
- the original colorkey
- the key for which the color is needed, can only be one
of the focused kindnull
protected abstract java.awt.Color convertSelected(java.awt.Color source, java.lang.String key)
key
.source
- the original colorkey
- the key for which the color is needed, can only
be one of the selected kindnull
protected abstract boolean isForeground(java.lang.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(java.lang.String id)
id
represents a color that is used on
focused titles.id
- some idtrue
if the color is used on focused buttonsprotected abstract boolean isSelected(java.lang.String id)
id
represents a color that is used
on a selected title.id
- some idtrue
if the color is used on a selected buttonpublic java.lang.String[] getKeys()
protected java.awt.Color get(java.awt.Color color, java.lang.String id, DockColor observer)
UITransmitter
UITransmitter
.get
in class UITransmitter<java.awt.Color,DockColor>
color
- the original valueid
- the key of the valueobserver
- the destination for the valueobserver
protected CDockable getDockable(DockColor observer)
UITransmitter
CDockable
which is associated with observer
.getDockable
in class UITransmitter<java.awt.Color,DockColor>
observer
- some observernull
protected java.awt.Color get(java.awt.Color color, java.lang.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, java.lang.String key, java.awt.Color color)
UITransmitter
update
in class UITransmitter<java.awt.Color,DockColor>
dockable
- the owner of the mapkey
- the name of the changed valuecolor
- the new value in the map, can be null