本文整理匯總了Java中com.intellij.ui.SimpleTextAttributes.STYLE_BOLD屬性的典型用法代碼示例。如果您正苦於以下問題:Java SimpleTextAttributes.STYLE_BOLD屬性的具體用法?Java SimpleTextAttributes.STYLE_BOLD怎麽用?Java SimpleTextAttributes.STYLE_BOLD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.intellij.ui.SimpleTextAttributes
的用法示例。
在下文中一共展示了SimpleTextAttributes.STYLE_BOLD屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doUpdate
@Override
protected void doUpdate() {
setUniformIcon(getNodeIcon());
clearColoredText();
final boolean showErrors = hasErrors();
final int childrenCount = getChildren().length;
if (childrenCount > 0) {
final SimpleTextAttributes textAttributes =
showErrors ? getWavedAttributes(SimpleTextAttributes.STYLE_BOLD) : new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, SimpleTextAttributes.REGULAR_ATTRIBUTES.getFgColor());
addColoredFragment(getNodeName(), textAttributes);
addColoredFragment(" (" + childrenCount + ')', showErrors ? IdeBundle.message("dom.elements.tree.childs.contain.errors") : null,
SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
}
else {
addColoredFragment(getNodeName(), SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES);
}
}
示例2: getPlainAttributes
@Override
protected SimpleTextAttributes getPlainAttributes() {
SimpleTextAttributes original = super.getPlainAttributes();
int style = original.getStyle();
Color color = original.getFgColor();
boolean custom = false;
if ("test".equals(myGoal) && MavenRunner.getInstance(myProject).getSettings().isSkipTests()) {
color = SimpleTextAttributes.GRAYED_ATTRIBUTES.getFgColor();
style |= SimpleTextAttributes.STYLE_STRIKEOUT;
custom = true;
}
if (myGoal.equals(myMavenProject.getDefaultGoal())) {
style |= SimpleTextAttributes.STYLE_BOLD;
custom = true;
}
if (custom) return original.derive(style, color, null, null);
return original;
}
示例3: setUI
public void setUI(final TreeUI ui) {
super.setUI(ui);
// [vova] we cannot create this hash in constructor and just clear it here. The
// problem is that setUI is invoked by constructor of superclass.
myHighlightAttributes = new HashMap<HighlightSeverity, Map<SimpleTextAttributes, SimpleTextAttributes>>();
final EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme();
final TextAttributes attributes = globalScheme.getAttributes(JavaHighlightingColors.STRING);
myBindingAttributes = new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, UIUtil.getTreeForeground());
myClassAttributes = new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, UIUtil.getTreeForeground());
myPackageAttributes = new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, Color.GRAY);
myTitleAttributes =new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, attributes.getForegroundColor());
myUnknownAttributes = new SimpleTextAttributes(SimpleTextAttributes.STYLE_WAVED, Color.RED);
}
示例4: getSpecialAttributes
private static SimpleTextAttributes getSpecialAttributes() {
return new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, TestsUIUtil.PASSED_COLOR);
}