本文整理汇总了Java中com.intellij.openapi.editor.colors.EditorColorsScheme.getFont方法的典型用法代码示例。如果您正苦于以下问题:Java EditorColorsScheme.getFont方法的具体用法?Java EditorColorsScheme.getFont怎么用?Java EditorColorsScheme.getFont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.editor.colors.EditorColorsScheme
的用法示例。
在下文中一共展示了EditorColorsScheme.getFont方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LookupCellRenderer
import com.intellij.openapi.editor.colors.EditorColorsScheme; //导入方法依赖的package包/类
public LookupCellRenderer(LookupImpl lookup) {
EditorColorsScheme scheme = lookup.getEditor().getColorsScheme();
myNormalFont = scheme.getFont(EditorFontType.PLAIN);
myBoldFont = scheme.getFont(EditorFontType.BOLD);
myLookup = lookup;
myNameComponent = new MySimpleColoredComponent();
myNameComponent.setIpad(JBUI.insetsLeft(2));
myNameComponent.setMyBorder(null);
myTailComponent = new MySimpleColoredComponent();
myTailComponent.setIpad(new Insets(0, 0, 0, 0));
myTypeLabel = new MySimpleColoredComponent();
myTypeLabel.setIpad(new Insets(0, 0, 0, 0));
myPanel = new LookupPanel();
myPanel.add(myNameComponent, BorderLayout.WEST);
myPanel.add(myTailComponent, BorderLayout.CENTER);
myTailComponent.setBorder(new EmptyBorder(0, 0, 0, AFTER_TAIL));
myPanel.add(myTypeLabel, BorderLayout.EAST);
myTypeLabel.setBorder(new EmptyBorder(0, 0, 0, AFTER_TYPE));
myNormalMetrics = myLookup.getEditor().getComponent().getFontMetrics(myNormalFont);
myBoldMetrics = myLookup.getEditor().getComponent().getFontMetrics(myBoldFont);
}
示例2: MyListCellRenderer
import com.intellij.openapi.editor.colors.EditorColorsScheme; //导入方法依赖的package包/类
public MyListCellRenderer() {
myPanel = new JPanel(new BorderLayout());
myPanel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));
myNameLabel = new JLabel();
myPanel.add(myNameLabel, BorderLayout.WEST);
myPanel.add(new JLabel(" "));
myNSLabel = new JLabel();
myPanel.add(myNSLabel, BorderLayout.EAST);
EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
Font font = scheme.getFont(EditorFontType.PLAIN);
myNameLabel.setFont(font);
myNSLabel.setFont(font);
}
示例3: MyListCellRenderer
import com.intellij.openapi.editor.colors.EditorColorsScheme; //导入方法依赖的package包/类
public MyListCellRenderer() {
myPanel = new JPanel(new BorderLayout());
myPanel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));
myNameLabel = new JLabel();
myPanel.add(myNameLabel, BorderLayout.WEST);
myPanel.add(new JLabel(" "));
myDescLabel = new JLabel();
myPanel.add(myDescLabel, BorderLayout.EAST);
EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
Font font = scheme.getFont(EditorFontType.PLAIN);
myNameLabel.setFont(font);
myDescLabel.setFont(font);
}