Java Code Examples for com.intellij.util.ui.UIUtil#isWinLafOnVista()
The following examples show how to use
com.intellij.util.ui.UIUtil#isWinLafOnVista() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IdeMenuBar.java From consulo with Apache License 2.0 | 5 votes |
@Override public void run() { if (!isShowing()) { return; } final Window myWindow = SwingUtilities.windowForComponent(IdeMenuBar.this); if (myWindow != null && !myWindow.isActive()) return; // do not update when a popup menu is shown (if popup menu contains action which is also in the menu bar, it should not be enabled/disabled) final MenuSelectionManager menuSelectionManager = MenuSelectionManager.defaultManager(); final MenuElement[] selectedPath = menuSelectionManager.getSelectedPath(); if (selectedPath.length > 0) { return; } // don't update toolbar if there is currently active modal dialog final Window window = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow(); if (window instanceof Dialog) { if (((Dialog)window).isModal()) { return; } } updateMenuActions(); if (UIUtil.isWinLafOnVista()) { repaint(); } }
Example 2
Source File: LafManagerImpl.java From consulo with Apache License 2.0 | 4 votes |
/** * Updates LAF of all windows. The method also updates font of components * as it's configured in <code>UISettings</code>. */ @Override public void updateUI() { final UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults(); GTKPlusUIUtil.updateUI(); fixPopupWeight(); fixGtkPopupStyle(); if (UIUtil.isUnderAquaLookAndFeel()) { uiDefaults.put("Panel.opaque", Boolean.TRUE); uiDefaults.put("ScrollBarUI", MacButtonlessScrollbarUI.class.getName()); uiDefaults.put("JBEditorTabsUI", MacEditorTabsUI.class.getName()); uiDefaults.put("MenuItemUI", BegMenuItemUI.class.getName()); uiDefaults.put("CheckBoxMenuItemUI", BegMenuItemUI.class.getName()); uiDefaults.put("MenuUI", IdeaMenuUI.class.getName()); } else if (UIUtil.isWinLafOnVista()) { uiDefaults.put("ComboBox.border", null); } initInputMapDefaults(uiDefaults); uiDefaults.put("Button.defaultButtonFollowsFocus", Boolean.FALSE); patchFileChooserStrings(uiDefaults); patchLafFonts(uiDefaults); patchHiDPI(uiDefaults); patchOptionPaneIcons(uiDefaults); fixSeparatorColor(uiDefaults); LafManagerImplUtil.insertCustomComponentUI(uiDefaults); updateToolWindows(); for (Frame frame : Frame.getFrames()) { updateUI(frame); } fireLookAndFeelChanged(); }