Java Utililty Methods Color Value

List of utility methods to do Color Value

Description

The list of methods to do Color Value are organized into topic(s).

Method

ColorgetValidFieldColor()
get Valid Field Color
return UIManager.getColor("TextField.background");
ColorgetXpHeaderColor(int type, boolean fill)
get Xp Header Color
String colorKey = null;
switch (type) {
case XP_REGULAR_TAB:
    colorKey = fill ? "tab_unsel_fill_bright" : "tab_border";
    break;
case XP_HIGHLIGHTED_TAB:
    colorKey = fill ? "tab_highlight_header_fill" : "tab_highlight_header";
    break;
...
voidlistUIColorResources()
list UI Color Resources
List colorProperties = new ArrayList();
UIDefaults uid = UIManager.getDefaults();
Enumeration e = uid.keys();
while (e.hasMoreElements()) {
    Object key = e.nextElement();
    Object property = uid.get(key);
    if (property instanceof Color)
        colorProperties.add(key);
...
voidsetDefaultColor()
set Default Color
final Color hsqlBlue = new Color(102, 153, 204);
final Color hsqlGreen = new Color(153, 204, 204);
final UIDefaults d = UIManager.getLookAndFeelDefaults();
d.put("MenuBar.background", SystemColor.control);
d.put("Menu.background", SystemColor.control);
d.put("Menu.selectionBackground", hsqlBlue);
d.put("MenuItem.background", SystemColor.menu);
d.put("MenuItem.selectionBackground", hsqlBlue);
...