Package bibliothek.gui.dock.common
Class ColorMap
java.lang.Object
bibliothek.gui.dock.common.ColorMap
A map containing several
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.- Author:
- Benjamin Sigg
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringa key for colors that are used on the button of the minimized-area as backgroundstatic final Stringa key for colors that are used on the button of the minimized-area as background if focusedstatic final Stringa key for colors that are used on the button of the minimized-area as background if selectedstatic final Stringa key for colors that are used on the button of the minimized-area as foregroundstatic final Stringa key for colors that are used on the button of the minimized-area as foreground if focusedstatic final Stringa key for colors that are used on the button of the minimized-area as foreground if selectedstatic final Stringa key for colors that are used on unselected tabs as backgroundstatic final Stringa key for colors that are used on focused tabs as backgroundstatic final Stringa key for colors that are used on selected, but not focused, tabs as backgroundstatic final Stringa key for colors that are used on unselected tabs as foregroundstatic final Stringa key for colors that are used on focused tabs a foregroundstatic final Stringa key for colors that are used on selected, but not focused, tabs as foregroundstatic final Stringa key for colors that are used on titles as backgroundstatic final Stringa key for colors that are used on focused titles as backgroundstatic final Stringa key for colors that are used on titles as foregroundstatic final Stringa key for colors that are used on focused titles as foreground -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ColorMapListener listener) Adds a listener to this map, the listener will be informed whenever a color of this map changes.Returns a color that was stored in this map.Gets the owner of this map.voidremoveListener(ColorMapListener listener) Removes a listener from this map.voidSets a color in this map.
-
Field Details
-
COLOR_KEY_TAB_BACKGROUND
a key for colors that are used on unselected tabs as background- See Also:
-
COLOR_KEY_TAB_FOREGROUND
a key for colors that are used on unselected tabs as foreground- See Also:
-
COLOR_KEY_TAB_BACKGROUND_SELECTED
a key for colors that are used on selected, but not focused, tabs as background- See Also:
-
COLOR_KEY_TAB_FOREGROUND_SELECTED
a key for colors that are used on selected, but not focused, tabs as foreground- See Also:
-
COLOR_KEY_TAB_BACKGROUND_FOCUSED
a key for colors that are used on focused tabs as background- See Also:
-
COLOR_KEY_TAB_FOREGROUND_FOCUSED
a key for colors that are used on focused tabs a foreground- See Also:
-
COLOR_KEY_TITLE_BACKGROUND
a key for colors that are used on titles as background- See Also:
-
COLOR_KEY_TITLE_FOREGROUND
a key for colors that are used on titles as foreground- See Also:
-
COLOR_KEY_TITLE_BACKGROUND_FOCUSED
a key for colors that are used on focused titles as background- See Also:
-
COLOR_KEY_TITLE_FOREGROUND_FOCUSED
a key for colors that are used on focused titles as foreground- See Also:
-
COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND
a key for colors that are used on the button of the minimized-area as background- See Also:
-
COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND
a key for colors that are used on the button of the minimized-area as foreground- See Also:
-
COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND_FOCUSED
a key for colors that are used on the button of the minimized-area as background if focused- See Also:
-
COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND_FOCUSED
a key for colors that are used on the button of the minimized-area as foreground if focused- See Also:
-
COLOR_KEY_MINIMIZED_BUTTON_BACKGROUND_SELECTED
a key for colors that are used on the button of the minimized-area as background if selected- See Also:
-
COLOR_KEY_MINIMIZED_BUTTON_FOREGROUND_SELECTED
a key for colors that are used on the button of the minimized-area as foreground if selected- See Also:
-
-
Constructor Details
-
ColorMap
Creates a new map.- Parameters:
dockable- the owner of this map
-
-
Method Details
-
getDockable
Gets the owner of this map.- Returns:
- the owner
-
addListener
Adds a listener to this map, the listener will be informed whenever a color of this map changes.- Parameters:
listener- the new listener
-
removeListener
Removes a listener from this map.- Parameters:
listener- the listener to remove
-
getColor
Returns a color that was stored in this map.- Parameters:
key- the name of the color- Returns:
- the color or
null
-
setColor
Sets a color in this map.- Parameters:
key- the name of the colorcolor- the new color, can benullto return to the default color
-