Dockable Background color


How can I change the background color and text of a dockable title?


In Common: use the ColorMap and the method “setTitleText” every DefaultCDockable provides. You might want to look into the guide for Common, page 23.

In Core: For the text use the method “setTitleText” of DefaultDockable. The color is more complex. You can find a simple example in the guide for Core, page 32.

In short: You could access the ColorManager (DockController#getColors()). You would need to implemented a class of type “ColorBridge”. The ColorBridge gets default-values for various kinds of colors (foreground of titles, background of titles, gradient of titles…) and forwards either the defaults values of custom values to “UIValues”. An object of your new class would be registered at the ColorManager using its method publish, priority “CLIENT” and path “TitleColor.KIND_TITLE_COLOR”.

The colors are associated with keys (e.g. to tell whether they are meant for the background or the foreground), you’ll need to experiment a bit to find the correct keys.