當前位置: 首頁>>代碼示例>>Java>>正文


Java DarculaInstaller.uninstall方法代碼示例

本文整理匯總了Java中com.intellij.ide.ui.laf.darcula.DarculaInstaller.uninstall方法的典型用法代碼示例。如果您正苦於以下問題:Java DarculaInstaller.uninstall方法的具體用法?Java DarculaInstaller.uninstall怎麽用?Java DarculaInstaller.uninstall使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.ide.ui.laf.darcula.DarculaInstaller的用法示例。


在下文中一共展示了DarculaInstaller.uninstall方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: removeTheme

import com.intellij.ide.ui.laf.darcula.DarculaInstaller; //導入方法依賴的package包/類
/**
 * Completely remove theme
 *
 * @param mtTheme
 */
private void removeTheme(final MTThemes mtTheme) {
  try {
    resetContrast();

    if (UIUtil.isUnderDarcula()) {
      UIManager.setLookAndFeel(new DarculaLaf());
    } else {
      UIManager.setLookAndFeel(new IntelliJLaf());
    }

    JBColor.setDark(mtTheme.isDark());
    IconLoader.setUseDarkIcons(mtTheme.isDark());
    PropertiesComponent.getInstance().unsetValue(getSettingsPrefix() + ".theme");

    // We need this to update parts of the UI that do not change
    if (UIUtil.isUnderDarcula()) {
      DarculaInstaller.uninstall();
      DarculaInstaller.install();
    } else {
      DarculaInstaller.uninstall();
    }
  } catch (final UnsupportedLookAndFeelException e) {
    e.printStackTrace();
  }
}
 
開發者ID:ChrisRM,項目名稱:material-theme-jetbrains,代碼行數:31,代碼來源:MTThemeManager.java

示例2: initComponent

import com.intellij.ide.ui.laf.darcula.DarculaInstaller; //導入方法依賴的package包/類
@Override
public void initComponent() {
  if (myCurrentLaf != null) {
    final UIManager.LookAndFeelInfo laf = findLaf(myCurrentLaf.getClassName());
    if (laf != null) {
      boolean needUninstall = UIUtil.isUnderDarcula();
      setCurrentLookAndFeel(laf); // setup default LAF or one specified by readExternal.
      if (WelcomeWizardUtil.getWizardLAF() != null) {
        if (UIUtil.isUnderDarcula()) {
          DarculaInstaller.install();
        }
        else if (needUninstall) {
          DarculaInstaller.uninstall();
        }
      }
    }
  }

  updateUI();

  if (SystemInfo.isXWindow) {
    myThemeChangeListener = new PropertyChangeListener() {
      @Override
      public void propertyChange(final PropertyChangeEvent evt) {
        //noinspection SSBasedInspection
        SwingUtilities.invokeLater(new Runnable() {
          @Override
          public void run() {
            fixGtkPopupStyle();
            patchGtkDefaults(UIManager.getLookAndFeelDefaults());
          }
        });
      }
    };
    Toolkit.getDefaultToolkit().addPropertyChangeListener(GNOME_THEME_PROPERTY_NAME, myThemeChangeListener);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:38,代碼來源:LafManagerImpl.java

示例3: commitStep

import com.intellij.ide.ui.laf.darcula.DarculaInstaller; //導入方法依賴的package包/類
@Override
public boolean commitStep() {
  // This code is duplicated from LafManager.initComponent(). But our Welcome Wizard is started
  // AFTER that call so we repeat it here.
  if (UIUtil.isUnderDarcula()) {
    DarculaInstaller.install();
  }
  else {
    DarculaInstaller.uninstall();
  }

  return super.commitStep();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:SelectThemeStep.java

示例4: reloadUI

import com.intellij.ide.ui.laf.darcula.DarculaInstaller; //導入方法依賴的package包/類
/**
 * Trigger a reloadUI event
 *
 * @param mtTheme
 */
private void reloadUI(final MTTheme mtTheme) {
  try {
    UIManager.setLookAndFeel(new MTLaf(MTConfig.getInstance().getSelectedTheme().getTheme()));

    applyFonts();

    DarculaInstaller.uninstall();
    if (UIUtil.isUnderDarcula()) {
      DarculaInstaller.install();
    }
  } catch (final UnsupportedLookAndFeelException e) {
    e.printStackTrace();
  }
}
 
開發者ID:ChrisRM,項目名稱:material-theme-jetbrains,代碼行數:20,代碼來源:MTThemeManager.java

示例5: activate

import com.intellij.ide.ui.laf.darcula.DarculaInstaller; //導入方法依賴的package包/類
/**
 * Activate theme
 *
 * @param mtTheme
 */
public void activate(final MTThemes mtTheme, final boolean switchColorScheme) {
  MTThemes newTheme = mtTheme;
  if (newTheme == null) {
    newTheme = MTThemes.OCEANIC;
  }

  MTConfig.getInstance().setSelectedTheme(newTheme);

  newTheme.getTheme().activate();
  switchScheme(newTheme, switchColorScheme);

  // Because the DarculaInstaller overrides this
  final EditorColorsScheme currentScheme = EditorColorsManager.getInstance().getGlobalScheme();

  PropertiesComponent.getInstance().setValue(getSettingsPrefix() + ".theme", newTheme.getId());
  applyContrast(false);
  applyCompactSidebar(false);
  applyCustomTreeIndent();
  applyAccents(false);
  setBoldTabs();

  // We need this to update parts of the UI that do not change
  if (UIUtil.isUnderDarcula()) {
    DarculaInstaller.uninstall();
    DarculaInstaller.install();
  } else {
    DarculaInstaller.uninstall();
  }
  LafManager.getInstance().updateUI();

  // Because the DarculaInstaller overrides this
  EditorColorsManager.getInstance().setGlobalScheme(currentScheme);

  applyFonts();

  // Documentation styles
  patchStyledEditorKit();

  UIReplacer.patchUI();
}
 
開發者ID:ChrisRM,項目名稱:material-theme-jetbrains,代碼行數:46,代碼來源:MTThemeManager.java


注:本文中的com.intellij.ide.ui.laf.darcula.DarculaInstaller.uninstall方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。