Package com.intellij.ui

Examples of com.intellij.ui.SimpleTextAttributes


  protected SimpleTextAttributes getSimpleAttributes(final int style) {
    return new SimpleTextAttributes(style, SimpleTextAttributes.REGULAR_ATTRIBUTES.getFgColor());
  }

  protected SimpleTextAttributes getWavedAttributes(final int style) {
    return new SimpleTextAttributes(style | SimpleTextAttributes.STYLE_WAVED, SimpleTextAttributes.REGULAR_ATTRIBUTES.getFgColor(), SimpleTextAttributes.ERROR_ATTRIBUTES.getFgColor());
  }
View Full Code Here


    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);
    }
View Full Code Here

  public int getWeight() {
    return myWeight;
  }

  protected SimpleTextAttributes getErrorAttributes() {
    return new SimpleTextAttributes(SimpleTextAttributes.STYLE_WAVED, getColor(), Color.red);
  }
View Full Code Here

  protected SimpleTextAttributes getErrorAttributes() {
    return new SimpleTextAttributes(SimpleTextAttributes.STYLE_WAVED, getColor(), Color.red);
  }

  protected SimpleTextAttributes getPlainAttributes() {
    return new SimpleTextAttributes(Font.PLAIN, getColor());
  }
View Full Code Here

    return result.toString();
  }

  public final void setNodeText(String text, String tooltip, boolean hasError){
    clearColoredText();
    SimpleTextAttributes attributes = hasError ? getErrorAttributes() : getPlainAttributes();
    myColoredText.add(new ColoredFragment(text, tooltip, attributes));
  }
View Full Code Here

        return;
      }
    }
    String text = tree.convertValueToText(value, selected, expanded, leaf, row, hasFocus);
    if (text == null) text = "";
    append(text, new SimpleTextAttributes(Font.PLAIN, color));
  }
View Full Code Here

TOP

Related Classes of com.intellij.ui.SimpleTextAttributes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.