public class ColorMap extends Object
Colors. A ColorMap is
associated with exactly one CDockable. The colors in the map are
used to change the standard colors that normally used for example to paint
a title or to draw a tab. The entries of this map can be changed at any
time. Changes of any entry in this map will be forwarded instantaneously
to the element that uses the entry.| Modifier and Type | Field and Description |
|---|---|
static String |
COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND
a key for colors that are used on the button of the minimized-area as background
|
static String |
COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND_FOCUSED
a key for colors that are used on the button of the minimized-area as background if focused
|
static String |
COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND_SELECTED
a key for colors that are used on the button of the minimized-area as background if selected
|
static String |
COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND
a key for colors that are used on the button of the minimized-area as foreground
|
static String |
COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND_FOCUSED
a key for colors that are used on the button of the minimized-area as foreground if focused
|
static String |
COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND_SELECTED
a key for colors that are used on the button of the minimized-area as foreground if selected
|
static String |
COLOR_KEY_TAB_BACKGROUND
a key for colors that are used on unselected tabs as background
|
static String |
COLOR_KEY_TAB_BACKGROUND_FOCUSED
a key for colors that are used on focused tabs as background
|
static String |
COLOR_KEY_TAB_BACKGROUND_SELECTED
a key for colors that are used on selected, but not focused, tabs as background
|
static String |
COLOR_KEY_TAB_FOREGROUND
a key for colors that are used on unselected tabs as foreground
|
static String |
COLOR_KEY_TAB_FOREGROUND_FOCUSED
a key for colors that are used on focused tabs a foreground
|
static String |
COLOR_KEY_TAB_FOREGROUND_SELECTED
a key for colors that are used on selected, but not focused, tabs as foreground
|
static String |
COLOR_KEY_TITLE_BACKGROUND
a key for colors that are used on titles as background
|
static String |
COLOR_KEY_TITLE_BACKGROUND_FOCUSED
a key for colors that are used on focused titles as background
|
static String |
COLOR_KEY_TITLE_FOREGROUND
a key for colors that are used on titles as foreground
|
static String |
COLOR_KEY_TITLE_FOREGROUND_FOCUSED
a key for colors that are used on focused titles as foreground
|
| Constructor and Description |
|---|
ColorMap(CDockable dockable)
Creates a new map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ColorMapListener listener)
Adds a listener to this map, the listener will be informed whenever
a color of this map changes.
|
Color |
getColor(String key)
Returns a color that was stored in this map.
|
CDockable |
getDockable()
Gets the owner of this map.
|
void |
removeListener(ColorMapListener listener)
Removes a listener from this map.
|
void |
setColor(String key,
Color color)
Sets a color in this map.
|
public static final String COLOR_KEY_TAB_BACKGROUND
public static final String COLOR_KEY_TAB_FOREGROUND
public static final String COLOR_KEY_TAB_BACKGROUND_SELECTED
public static final String COLOR_KEY_TAB_FOREGROUND_SELECTED
public static final String COLOR_KEY_TAB_BACKGROUND_FOCUSED
public static final String COLOR_KEY_TAB_FOREGROUND_FOCUSED
public static final String COLOR_KEY_TITLE_BACKGROUND
public static final String COLOR_KEY_TITLE_FOREGROUND
public static final String COLOR_KEY_TITLE_BACKGROUND_FOCUSED
public static final String COLOR_KEY_TITLE_FOREGROUND_FOCUSED
public static final String COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND
public static final String COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND
public static final String COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND_FOCUSED
public static final String COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND_FOCUSED
public static final String COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND_SELECTED
public static final String COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND_SELECTED
public ColorMap(CDockable dockable)
dockable - the owner of this mappublic CDockable getDockable()
public void addListener(ColorMapListener listener)
listener - the new listenerpublic void removeListener(ColorMapListener listener)
listener - the listener to removepublic Color getColor(String key)
key - the name of the colornullCopyright © 2018. All rights reserved.