Ejemplo n.º 1
0
 private static void fixTreeWideSelection(UIDefaults uiDefaults) {
   if (UIUtil.isUnderAlloyIDEALookAndFeel() || UIUtil.isUnderJGoodiesLookAndFeel()) {
     final Color bg = new ColorUIResource(56, 117, 215);
     final Color fg = new ColorUIResource(255, 255, 255);
     uiDefaults.put("info", bg);
     uiDefaults.put("textHighlight", bg);
     for (String key : ourAlloyComponentsToPatchSelection) {
       uiDefaults.put(key + ".selectionBackground", bg);
       uiDefaults.put(key + ".selectionForeground", fg);
     }
   }
 }
Ejemplo n.º 2
0
 private static void fixMenuIssues(UIDefaults uiDefaults) {
   if (UIUtil.isUnderAquaLookAndFeel()) {
     // update ui for popup menu to get round corners
     uiDefaults.put("PopupMenuUI", MacPopupMenuUI.class.getCanonicalName());
     uiDefaults.put("Menu.invertedArrowIcon", getAquaMenuInvertedIcon());
     uiDefaults.put("Menu.disabledArrowIcon", getAquaMenuDisabledIcon());
   } else if (UIUtil.isUnderJGoodiesLookAndFeel()) {
     uiDefaults.put("Menu.opaque", true);
     uiDefaults.put("MenuItem.opaque", true);
   }
   uiDefaults.put("MenuItem.background", UIManager.getColor("Menu.background"));
 }