當前位置: 首頁>>代碼示例>>Java>>正文


Java SimpleTextAttributes.STYLE_BOLD屬性代碼示例

本文整理匯總了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);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:21,代碼來源:DomElementsGroupNode.java

示例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;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:20,代碼來源:MavenProjectsStructure.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:ComponentTree.java

示例4: getSpecialAttributes

private static SimpleTextAttributes getSpecialAttributes() {
  return new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, TestsUIUtil.PASSED_COLOR);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:3,代碼來源:TestRenderer.java


注:本文中的com.intellij.ui.SimpleTextAttributes.STYLE_BOLD屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。