private void defineMenus(UIDefaults d){
  d.put("menuItemBackgroundBase",new Color(0x5b7ea4));
  String c=PAINTER_PREFIX + "MenuPainter";
  String p="Menu";
  d.put(p + ".contentMargins",new InsetsUIResource(1,12,2,5));
  d.put(p + "[Disabled].textForeground",d.get("seaGlassDisabledText"));
  d.put(p + "[Enabled].textForeground",new ColorUIResource(Color.BLACK));
  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));
  d.put(p + ".checkIcon",new SeaGlassIcon(p + "","checkIconPainter",6,10));
  p="Menu:MenuItemAccelerator";
  d.put(p + ".contentMargins",new InsetsUIResource(0,0,0,0));
  d.put(p + "[MouseOver].textForeground",new ColorUIResource(Color.WHITE));
  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");
  }
  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));
  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 + ".acceleratorFont",new DerivedFont("defaultFont",1.0f,null,null));
  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));
  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));
  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));
  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));
  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));
}

private void defineMenus ( UIDefaults d ) { d . put ( "menuItemBackgroundBase" , new Color ( 0x5b7ea4 ) ) ; String c = PAINTER_PREFIX + "MenuPainter" ; String p = "Menu" ; d . put ( p + ".contentMargins" , new InsetsUIResource ( 1 , 12 , 2 , 5 ) ) ; d . put ( p + "[Disabled].textForeground" , d . get ( "seaGlassDisabledText" ) ) ; d . put ( p + "[Enabled].textForeground" , new ColorUIResource ( Color . BLACK ) ) ; 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 ) ) ; d . put ( p + ".checkIcon" , new SeaGlassIcon ( p + "" , "checkIconPainter" , 6 , 10 ) ) ; p = "Menu:MenuItemAccelerator" ; d . put ( p + ".contentMargins" , new InsetsUIResource ( 0 , 0 , 0 , 0 ) ) ; d . put ( p + "[MouseOver].textForeground" , new ColorUIResource ( Color . WHITE ) ) ; 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" ) ; } 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 ) ) ; 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 + ".acceleratorFont" , new DerivedFont ( "defaultFont" , 1.0f , null , null ) ) ; 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 ) ) ; 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 ) ) ; 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 ) ) ; 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 ) ) ; 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 ) ) ; }
initialize the menu settings .
