d.put(p + "[Enabled+Selected].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[Enabled+Selected].backgroundPainter", new LazyPainter(c, MenuPainter.Which.BACKGROUND_ENABLED_SELECTED));
d.put(p + "[Disabled].arrowIconPainter", new LazyPainter(c, MenuPainter.Which.ARROWICON_DISABLED));
d.put(p + "[Enabled].arrowIconPainter", new LazyPainter(c, MenuPainter.Which.ARROWICON_ENABLED));
d.put(p + "[Enabled+Selected].arrowIconPainter", new LazyPainter(c, MenuPainter.Which.ARROWICON_ENABLED_SELECTED));
d.put(p + ".arrowIcon", new SeaGlassIcon(p + "", "arrowIconPainter", 9, 10));
p = "Menu:MenuItemAccelerator";
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
d.put(p + "[MouseOver].textForeground", new ColorUIResource(Color.WHITE));
// We don't paint MenuBar backgrounds. Remove the painters.
c = PAINTER_PREFIX + "MenuBarPainter";
p = "MenuBar";
d.put(p + ".contentMargins", new InsetsUIResource(2, 6, 2, 6));
if (d.get(p + "[Enabled].backgroundPainter") != null) {
d.remove(p + "[Enabled].backgroundPainter");
}
if (d.get(p + "[Enabled].borderPainter") != null) {
d.remove(p + "[Enabled].borderPainter");
}
// Rossi: "Selected Menu" color changed to dark blue. Not tested with "unified" title/menu/toolbar
c = PAINTER_PREFIX + "MenuItemPainter";
p = "MenuBar:Menu";
d.put(p + ".States", "Enabled,Selected,Disabled,NotUnified");
d.put(p + ".NotUnified", new MenuNotUnified());
d.put(p + ".contentMargins", new InsetsUIResource(1, 4, 2, 4));
d.put(p + "[Disabled].textForeground", d.getColor("seaGlassDisabledText"));
d.put(p + "[Enabled].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[Selected].textForeground", new ColorUIResource(Color.BLACK));
d.put(p + "[Selected].backgroundPainter", new LazyPainter(c, MenuItemPainter.Which.BACKGROUND_MOUSEOVER_UNIFIED));
d.put(p + "[Enabled+NotUnified].textForeground", new ColorUIResource(Color.BLACK));
d.put(p + "[Enabled+Selected+NotUnified].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[Enabled+Selected+NotUnified].backgroundPainter", new LazyPainter(c, MenuItemPainter.Which.BACKGROUND_MOUSEOVER));
p = "MenuBar:Menu:MenuItemAccelerator";
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
// Initialize MenuItem
c = PAINTER_PREFIX + "MenuItemPainter";
p = "MenuItem";
d.put(p + ".contentMargins", new InsetsUIResource(1, 12, 2, 13));
d.put(p + ".textIconGap", new Integer(5));
d.put(p + "[Disabled].textForeground", d.getColor("seaGlassDisabledText"));
d.put(p + "[Enabled].textForeground", new ColorUIResource(Color.BLACK));
d.put(p + "[MouseOver].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[MouseOver].backgroundPainter", new LazyPainter(c, MenuItemPainter.Which.BACKGROUND_MOUSEOVER));
p = "MenuItem:MenuItemAccelerator";
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
d.put(p + "[Disabled].textForeground", d.getColor("seaGlassDisabledText"));
d.put(p + "[MouseOver].textForeground", new ColorUIResource(Color.WHITE));
// Initialize CheckBoxMenuItem
c = PAINTER_PREFIX + "CheckBoxMenuItemPainter";
p = "CheckBoxMenuItem";
d.put(p + ".contentMargins", new InsetsUIResource(1, 12, 2, 13));
d.put(p + ".textIconGap", new Integer(5));
d.put(p + "[Disabled].textForeground", d.getColor("seaGlassDisabledText"));
d.put(p + "[Enabled].textForeground", new ColorUIResource(Color.BLACK));
d.put(p + "[MouseOver].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[MouseOver].backgroundPainter", new LazyPainter(c, CheckBoxMenuItemPainter.Which.BACKGROUND_MOUSEOVER));
d.put(p + "[MouseOver+Selected].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[MouseOver+Selected].backgroundPainter",
new LazyPainter(c, CheckBoxMenuItemPainter.Which.BACKGROUND_SELECTED_MOUSEOVER));
d.put(p + "[Disabled+Selected].checkIconPainter",
new LazyPainter(c, CheckBoxMenuItemPainter.Which.CHECKICON_DISABLED_SELECTED));
d.put(p + "[Enabled+Selected].checkIconPainter",
new LazyPainter(c, CheckBoxMenuItemPainter.Which.CHECKICON_ENABLED_SELECTED));
// Rossi: Added painter that shows an "indicator" that menu item is a "selectable checkbox"
d.put(p + "[Enabled].checkIconPainter",
new LazyPainter(c, CheckBoxMenuItemPainter.Which.CHECKICON_ENABLED));
d.put(p + "[MouseOver].checkIconPainter",
new LazyPainter(c, CheckBoxMenuItemPainter.Which.CHECKICON_ENABLED_MOUSEOVER));
d.put(p + "[MouseOver+Selected].checkIconPainter",
new LazyPainter(c, CheckBoxMenuItemPainter.Which.CHECKICON_SELECTED_MOUSEOVER));
d.put(p + ".checkIcon", new SeaGlassIcon(p, "checkIconPainter", 9, 10));
p = "CheckBoxMenuItem:MenuItemAccelerator";
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
d.put(p + "[MouseOver].textForeground", new ColorUIResource(Color.WHITE));
// Initialize RadioButtonMenuItem
c = PAINTER_PREFIX + "RadioButtonMenuItemPainter";
p = "RadioButtonMenuItem";
d.put(p + ".contentMargins", new InsetsUIResource(1, 12, 2, 13));
d.put(p + ".textIconGap", new Integer(5));
d.put(p + "[Disabled].textForeground", d.getColor("seaGlassDisabledText"));
d.put(p + "[Enabled].textForeground", new ColorUIResource(Color.BLACK));
d.put(p + "[MouseOver].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[MouseOver].backgroundPainter", new LazyPainter(c, RadioButtonMenuItemPainter.Which.BACKGROUND_MOUSEOVER));
d.put(p + "[MouseOver+Selected].textForeground", new ColorUIResource(Color.WHITE));
d.put(p + "[MouseOver+Selected].backgroundPainter",
new LazyPainter(c, RadioButtonMenuItemPainter.Which.BACKGROUND_SELECTED_MOUSEOVER));
d.put(p + "[Disabled+Selected].checkIconPainter",
new LazyPainter(c, RadioButtonMenuItemPainter.Which.CHECKICON_DISABLED_SELECTED));
d.put(p + "[Enabled+Selected].checkIconPainter",
new LazyPainter(c, RadioButtonMenuItemPainter.Which.CHECKICON_ENABLED_SELECTED));
// Rossi: Added painter that shows an "indicator" that menu item is a "selectable radio button"
d.put(p + "[Enabled].checkIconPainter",
new LazyPainter(c, RadioButtonMenuItemPainter.Which.CHECKICON_ENABLED));
d.put(p + "[MouseOver].checkIconPainter",
new LazyPainter(c, RadioButtonMenuItemPainter.Which.CHECKICON_ENABLED_MOUSEOVER));
d.put(p + "[MouseOver+Selected].checkIconPainter",
new LazyPainter(c, RadioButtonMenuItemPainter.Which.CHECKICON_SELECTED_MOUSEOVER));
d.put(p + ".checkIcon", new SeaGlassIcon(p, "checkIconPainter", 9, 10));
p = "RadioButtonMenuItem:MenuItemAccelerator";
d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
d.put(p + "[MouseOver].textForeground", new ColorUIResource(Color.WHITE));
}