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


Java EditorColorsScheme.getConsoleFontSize方法代码示例

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


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

示例1: tweakEditorAndFireUpdateUI

import com.intellij.openapi.editor.colors.EditorColorsScheme; //导入方法依赖的package包/类
private static void tweakEditorAndFireUpdateUI(UISettings settings, boolean inPresentation) {
  EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme();
  int fontSize = inPresentation ? settings.PRESENTATION_MODE_FONT_SIZE : globalScheme.getEditorFontSize();
  if (inPresentation) {
    ourSavedConsoleFontSize = globalScheme.getConsoleFontSize();
    globalScheme.setConsoleFontSize(fontSize);
  }
  else {
    globalScheme.setConsoleFontSize(ourSavedConsoleFontSize);
  }
  for (Editor editor : EditorFactory.getInstance().getAllEditors()) {
    if (editor instanceof EditorEx) {
      ((EditorEx)editor).setFontSize(fontSize);
    }
  }
  UISettings.getInstance().fireUISettingsChanged();
  LafManager.getInstance().updateUI();
  EditorUtil.reinitSettings();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:TogglePresentationModeAction.java

示例2: CommandInputForm

import com.intellij.openapi.editor.colors.EditorColorsScheme; //导入方法依赖的package包/类
private CommandInputForm(final JFrame ideFrame, Component sourceComponent, AnActionEvent originalEvent) {
    super(ideFrame, true);
    this.ideFrame = ideFrame;
    this.setUndecorated(true);
    this.sourceComponent = sourceComponent;
    this.originalEvent = originalEvent;
    this.add(topPanel);
    EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
    Font commandFont = new Font(scheme.getConsoleFontName(), Font.PLAIN, scheme.getConsoleFontSize());
    commandField.setFont(commandFont);
    this.pack();
    popupMenu = new JPopupMenu();
    topPanel.setComponentPopupMenu(popupMenu);
    topPanel.setBorder(BorderFactory.createLineBorder(JBColor.gray));
    this.setAlwaysOnTop(true);
    commandField.setRequestFocusEnabled(true);
    commandField.addActionListener(e -> {

    });
    KeyStroke escKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
    commandField.registerKeyboardAction(e -> {
        popupMenu.setVisible(false);
        CommandInputForm.this.setVisible(false);
        CommandInputForm.this.dispose();
        currTyped = null;
        focusOnIdeFrame(ideFrame);
    }, escKeyStroke, JComponent.WHEN_FOCUSED);
    commandField.getDocument().addDocumentListener(new DocumentAdapter() {
        @Override
        protected void textChanged(DocumentEvent documentEvent) {
            onTextChange();
        }
    });
}
 
开发者ID:dyadix,项目名称:typengo,代码行数:35,代码来源:CommandInputForm.java

示例3: execute

import com.intellij.openapi.editor.colors.EditorColorsScheme; //导入方法依赖的package包/类
@Override
public void execute(Editor editor, DataContext dataContext) {
  if (!(editor instanceof EditorEx)) {
    return;
  }
  EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme();
  int fontSize = editor.getUserData(ConsoleViewUtil.EDITOR_IS_CONSOLE_VIEW) == Boolean.TRUE
                 ? globalScheme.getConsoleFontSize() : globalScheme.getEditorFontSize();
  EditorEx editorEx = (EditorEx)editor;
  editorEx.setFontSize(fontSize);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ResetFontSizeAction.java


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