本文整理汇总了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();
}
示例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();
}
});
}
示例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);
}