Search in sources :

Example 86 with SimpleTextAttributes

use of com.intellij.ui.SimpleTextAttributes in project intellij-plugins by JetBrains.

the class FlashUmlElementManager method getMethodPresentableName.

private SimpleColoredText getMethodPresentableName(JSFunction method) {
    int style = SimpleTextAttributes.STYLE_PLAIN;
    if (method.isDeprecated())
        style |= SimpleTextAttributes.STYLE_STRIKEOUT;
    if (!method.isPhysical())
        style |= SimpleTextAttributes.STYLE_ITALIC;
    final SimpleColoredText text = new SimpleColoredText();
    text.append(getMethodText(method), new SimpleTextAttributes(style, getFGColor()));
    return text;
}
Also used : SimpleTextAttributes(com.intellij.ui.SimpleTextAttributes) SimpleColoredText(com.intellij.ui.SimpleColoredText)

Example 87 with SimpleTextAttributes

use of com.intellij.ui.SimpleTextAttributes in project intellij-plugins by StepicOrg.

the class PresentationDataUtils method setAttributes.

private static void setAttributes(@NotNull PresentationData data, String text, JBColor color, Icon icon, boolean deleted) {
    data.clearText();
    int textStyle = SimpleTextAttributes.STYLE_PLAIN;
    if (deleted) {
        textStyle |= SimpleTextAttributes.STYLE_STRIKEOUT;
    }
    data.addText(text, new SimpleTextAttributes(textStyle, color));
    data.setIcon(icon);
    data.setPresentableText(text);
}
Also used : SimpleTextAttributes(com.intellij.ui.SimpleTextAttributes)

Aggregations

SimpleTextAttributes (com.intellij.ui.SimpleTextAttributes)87 TextAttributes (com.intellij.openapi.editor.markup.TextAttributes)15 JBColor (com.intellij.ui.JBColor)11 NotNull (org.jetbrains.annotations.NotNull)9 VirtualFile (com.intellij.openapi.vfs.VirtualFile)7 SimpleColoredComponent (com.intellij.ui.SimpleColoredComponent)7 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)7 TextAttributesKey (com.intellij.openapi.editor.colors.TextAttributesKey)6 TextRange (com.intellij.openapi.util.TextRange)6 NodeDescriptor (com.intellij.ide.util.treeView.NodeDescriptor)5 ItemPresentation (com.intellij.navigation.ItemPresentation)4 FileStatus (com.intellij.openapi.vcs.FileStatus)4 PresentationData (com.intellij.ide.projectView.PresentationData)3 PsiElement (com.intellij.psi.PsiElement)3 SimpleColoredText (com.intellij.ui.SimpleColoredText)3 List (java.util.List)3 PsIssue (com.android.tools.idea.gradle.structure.model.PsIssue)2 PTableItem (com.android.tools.idea.uibuilder.property.ptable.PTableItem)2 HighlightDisplayLevel (com.intellij.codeHighlighting.HighlightDisplayLevel)2 RefEntity (com.intellij.codeInspection.reference.RefEntity)2