当前位置: 首页>>代码示例>>Java>>正文


Java UISettings.getInstance方法代码示例

本文整理汇总了Java中com.intellij.ide.ui.UISettings.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java UISettings.getInstance方法的具体用法?Java UISettings.getInstance怎么用?Java UISettings.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ide.ui.UISettings的用法示例。


在下文中一共展示了UISettings.getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: moveMousePointerOn

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
public static void moveMousePointerOn(Component component) {
  if (component != null && component.isShowing()) {
    UISettings settings = ApplicationManager.getApplication() == null ? null : UISettings.getInstance();
    if (settings != null && settings.MOVE_MOUSE_ON_DEFAULT_BUTTON) {
      Point point = component.getLocationOnScreen();
      int dx = component.getWidth() / 2;
      int dy = component.getHeight() / 2;
      try {
        new Robot().mouseMove(point.x + dx, point.y + dy);
      }
      catch (AWTException ignored) {
        // robot is not available
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:IJSwingUtilities.java

示例2: show

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
public final void show(){
  setFocusableWindowState(myInfo.isActive());

  super.show();
  final UISettings uiSettings=UISettings.getInstance();
  if(uiSettings.ENABLE_ALPHA_MODE){
    final WindowManagerEx windowManager=WindowManagerEx.getInstanceEx();
    windowManager.setAlphaModeEnabled(this,true);
    if(myInfo.isActive()){
      windowManager.setAlphaModeRatio(this,0.0f);
    }else{
      windowManager.setAlphaModeRatio(this,uiSettings.ALPHA_MODE_RATIO);
    }
  }
  paint(getGraphics()); // This prevents annoying flick

  setFocusableWindowState(true);

  uiSettings.addUISettingsListener(myUISettingsListener, myDelayAlarm);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:FloatingDecorator.java

示例3: update

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
@Override
public void update(@NotNull AnActionEvent e) {
  final Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
  UISettings settings = UISettings.getInstance();
  final boolean enabled = project != null && settings.SHOW_NAVIGATION_BAR && !settings.PRESENTATION_MODE;
  e.getPresentation().setEnabled(enabled);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ActivateNavigationBarAction.java

示例4: updateText

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
private void updateText() {
  String text = myDecorator.getToolWindow().getStripeTitle();
  if (UISettings.getInstance().SHOW_TOOL_WINDOW_NUMBERS) {
    String toolWindowId = myDecorator.getToolWindow().getId();
    int mnemonic = ActivateToolWindowAction.getMnemonicForToolWindow(toolWindowId);
    if (mnemonic != -1) {
      text = (char)mnemonic + ": " + text;
      setMnemonic2(mnemonic);
    }
    else {
      setMnemonic2(0);
    }
  }
  setText(text);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:StripeButton.java

示例5: customizeSettings

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
private static void customizeSettings(PropertiesComponent propertiesComponent) {
  if (!propertiesComponent.getBoolean(CONFIG_V4)) {
    propertiesComponent.setValue(CONFIG_V4, "true");
    UISettings.getInstance().HIDE_TOOL_STRIPES = false;

    if (!propertiesComponent.getBoolean(CONFIG_V3)) {
      propertiesComponent.setValue(CONFIG_V3, "true");
      // See https://youtrack.jetbrains.com/issue/IDEA-113332
      // It's not really fixed but worked around by turning off the =-quoting
      WebEditorOptions.getInstance().setInsertQuotesForAttributeValue(false);
    }

    if (!propertiesComponent.getBoolean(CONFIG_V1)) {
      propertiesComponent.setValue(CONFIG_V1, "true");
      CodeInsightSettings.getInstance().AUTO_POPUP_JAVADOC_INFO = true;
      UISettings.getInstance().SCROLL_TAB_LAYOUT_IN_EDITOR = true;
      EditorSettingsExternalizable.getInstance().setVirtualSpace(false);

      // For Macs, use 10.5+ keymap as the default
      if (SystemInfo.isMac) {
        setDefaultMacKeymap();
      }
    }

    if (!propertiesComponent.getBoolean(CONFIG_V2)) {
      propertiesComponent.setValue(CONFIG_V2, "true");
      UISettings.getInstance().SHOW_MAIN_TOOLBAR = true;
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:AndroidInitialConfigurator.java

示例6: revalidate

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
@Override
public void revalidate() {
  final UISettings settings = UISettings.getInstance();
  if (!settings.SHOW_MAIN_TOOLBAR && settings.SHOW_NAVIGATION_BAR && !UISettings.getInstance().PRESENTATION_MODE) {
    toggleRunPanel(false);
    toggleRunPanel(true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:NavBarRootPaneExtension.java

示例7: createSingleRowLayout

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
@Override
protected SingleRowLayout createSingleRowLayout() {
  if (!UISettings.getInstance().HIDE_TABS_IF_NEED && supportsCompression()) {
    return new CompressibleSingleRowLayout(this);
  }
  else if (ApplicationManager.getApplication().isInternal() || Registry.is("editor.use.scrollable.tabs")) {
    return new ScrollableSingleRowLayout(this);
  }
  return super.createSingleRowLayout();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:JBEditorTabs.java

示例8: reset

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
@Override
public void reset() {
  UISettings uiSettings=UISettings.getInstance();

  myCbModifiedTabsMarkedWithAsterisk.setSelected(uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK);
  myShowTabsTooltipsCheckBox.setSelected(uiSettings.SHOW_TABS_TOOLTIPS);
  myScrollTabLayoutInEditorCheckBox.setSelected(uiSettings.SCROLL_TAB_LAYOUT_IN_EDITOR);
  myHideTabsCheckbox.setEnabled(myScrollTabLayoutInEditorCheckBox.isSelected());
  myHideTabsCheckbox.setSelected(uiSettings.HIDE_TABS_IF_NEED);
  myEditorTabPlacement.setSelectedItem(uiSettings.EDITOR_TAB_PLACEMENT);
  myHideKnownExtensions.setSelected(uiSettings.HIDE_KNOWN_EXTENSION_IN_TABS);
  myShowDirectoryInTabCheckBox.setSelected(uiSettings.SHOW_DIRECTORY_FOR_NON_UNIQUE_FILENAMES);
  myEditorTabLimitField.setText(Integer.toString(uiSettings.EDITOR_TAB_LIMIT));
  myReuseNotModifiedTabsCheckBox.setSelected(uiSettings.REUSE_NOT_MODIFIED_TABS);
  myShowCloseButtonOnCheckBox.setSelected(uiSettings.SHOW_CLOSE_BUTTON);

  if (uiSettings.CLOSE_NON_MODIFIED_FILES_FIRST) {
    myCloseNonModifiedFilesFirstRadio.setSelected(true);
  }
  else {
    myCloseLRUFilesRadio.setSelected(true);
  }
  if (uiSettings.ACTIVATE_MRU_EDITOR_ON_CLOSE) {
    myActivateMRUEditorOnCloseRadio.setSelected(true);
  }
  else if (uiSettings.ACTIVATE_RIGHT_EDITOR_ON_CLOSE) {
    myActivateRightNeighbouringTabRadioButton.setSelected(true);
  }
  else {
    myActivateLeftEditorOnCloseRadio.setSelected(true);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:EditorTabsConfigurable.java

示例9: updateItems

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
void updateItems() {
  for (NavBarItem item : myList) {
    item.update();
  }
  if (UISettings.getInstance().SHOW_NAVIGATION_BAR) {
    NavBarRootPaneExtension.NavBarWrapperPanel wrapperPanel = (NavBarRootPaneExtension.NavBarWrapperPanel) 
      SwingUtilities.getAncestorOfClass(NavBarRootPaneExtension.NavBarWrapperPanel.class, this);

    if (wrapperPanel != null) {
      wrapperPanel.revalidate();
      wrapperPanel.repaint();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:NavBarPanel.java

示例10: ToolWindowsPane

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
ToolWindowsPane(final IdeFrameImpl frame, ToolWindowManagerImpl manager) {
  myManager = manager;

  setOpaque(false);
  myFrame = frame;
  myId2Button = new HashMap<String, StripeButton>();
  myId2Decorator = new HashMap<String, InternalDecorator>();
  myButton2Info = new HashMap<StripeButton, WindowInfoImpl>();
  myDecorator2Info = new HashMap<InternalDecorator, WindowInfoImpl>();
  myUISettingsListener = new MyUISettingsListenerImpl();
  myId2SplitProportion = new HashMap<String, Float>();

  // Splitters

  myVerticalSplitter = new ThreeComponentsSplitter(true);
  Disposer.register(this, myVerticalSplitter);
  myVerticalSplitter.setDividerWidth(0);
  myVerticalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone"));
  myVerticalSplitter.setBackground(Color.gray);
  myHorizontalSplitter = new ThreeComponentsSplitter(false);
  Disposer.register(this, myHorizontalSplitter);
  myHorizontalSplitter.setDividerWidth(0);
  myHorizontalSplitter.setDividerMouseZoneSize(Registry.intValue("ide.splitter.mouseZone"));
  myHorizontalSplitter.setBackground(Color.gray);
  myWidescreen = UISettings.getInstance().WIDESCREEN_SUPPORT;
  myLeftHorizontalSplit = UISettings.getInstance().LEFT_HORIZONTAL_SPLIT;
  myRightHorizontalSplit = UISettings.getInstance().RIGHT_HORIZONTAL_SPLIT;
  if (myWidescreen) {
    myHorizontalSplitter.setInnerComponent(myVerticalSplitter);
  }
  else {
    myVerticalSplitter.setInnerComponent(myHorizontalSplitter);
  }

  // Tool stripes

  myTopStripe = new Stripe(SwingConstants.TOP, manager);
  myStripes.add(myTopStripe);
  myLeftStripe = new Stripe(SwingConstants.LEFT, manager);
  myStripes.add(myLeftStripe);
  myBottomStripe = new Stripe(SwingConstants.BOTTOM, manager);
  myStripes.add(myBottomStripe);
  myRightStripe = new Stripe(SwingConstants.RIGHT, manager);
  myStripes.add(myRightStripe);

  updateToolStripesVisibility();

  // Layered pane

  myLayeredPane = new MyLayeredPane(myWidescreen ? myHorizontalSplitter : myVerticalSplitter);

  // Compose layout

  add(myTopStripe, JLayeredPane.POPUP_LAYER);
  add(myLeftStripe, JLayeredPane.POPUP_LAYER);
  add(myBottomStripe, JLayeredPane.POPUP_LAYER);
  add(myRightStripe, JLayeredPane.POPUP_LAYER);
  add(myLayeredPane, JLayeredPane.DEFAULT_LAYER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:60,代码来源:ToolWindowsPane.java

示例11: isSelected

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
public boolean isSelected(AnActionEvent e){
  return UISettings.getInstance().SHOW_STATUS_BAR;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ViewStatusBarAction.java

示例12: isInPresentationMode

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
boolean isInPresentationMode() {
  return UISettings.getInstance().PRESENTATION_MODE && EditorUtil.isRealFileEditor(this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:bigFile.java

示例13: PyCharmInitialConfigurator

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
public PyCharmInitialConfigurator(MessageBus bus, final PropertiesComponent propertiesComponent, final FileTypeManager fileTypeManager) {
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration", "true");
    EditorSettingsExternalizable.getInstance().setVirtualSpace(false);
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V2")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V2", true);
    final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance().getCurrentSettings();
    settings.ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
    settings.getCommonSettings(PythonLanguage.getInstance()).ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
    UISettings.getInstance().SHOW_DIRECTORY_FOR_NON_UNIQUE_FILENAMES = true;
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V3")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V3", "true");
    UISettings.getInstance().SHOW_MEMORY_INDICATOR = false;
    final String ignoredFilesList = fileTypeManager.getIgnoredFilesList();
    ApplicationManager.getApplication().invokeLater(new Runnable() {
      @Override
      public void run() {
        ApplicationManager.getApplication().runWriteAction(new Runnable() {
          @Override
          public void run() {
            FileTypeManager.getInstance().setIgnoredFilesList(ignoredFilesList + ";*$py.class");
          }
        });
      }
    });
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V4")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V4", true);
    PyCodeInsightSettings.getInstance().SHOW_IMPORT_POPUP = false;
  }
  if (!propertiesComponent.getBoolean("PyCharm.InitialConfiguration.V5")) {
    propertiesComponent.setValue("PyCharm.InitialConfiguration.V5", true);
    CodeInsightSettings.getInstance().REFORMAT_ON_PASTE = CodeInsightSettings.NO_REFORMAT;
  }
  if (!propertiesComponent.isValueSet(DISPLAYED_PROPERTY)) {
    bus.connect().subscribe(AppLifecycleListener.TOPIC, new AppLifecycleListener.Adapter() {
      @Override
      public void welcomeScreenDisplayed() {
        ApplicationManager.getApplication().invokeLater(new Runnable() {
          public void run() {
            propertiesComponent.setValue(DISPLAYED_PROPERTY, "true");
            showInitialConfigurationDialog();
          }
        });
      }
    });
  }

  Registry.get("ide.scratch.enabled").setValue(true);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:53,代码来源:PyCharmInitialConfigurator.java

示例14: trimToSize

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
private void trimToSize(){
  final int limit = UISettings.getInstance().RECENT_FILES_LIMIT + 1;
  while(CHANGED_PATHS.size()>limit){
    CHANGED_PATHS.remove(0);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:IdeDocumentHistoryImpl.java

示例15: deleteAfterAllowedMaximum

import com.intellij.ide.ui.UISettings; //导入方法依赖的package包/类
private void deleteAfterAllowedMaximum() {
  int max = UISettings.getInstance().MAX_CLIPBOARD_CONTENTS;
  for (int i = myData.size() - 1; i >= max; i--) {
    myData.remove(i);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:CopyPasteManagerEx.java


注:本文中的com.intellij.ide.ui.UISettings.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。