Java Code Examples for com.intellij.ui.SimpleTextAttributes#STYLE_STRIKEOUT
The following examples show how to use
com.intellij.ui.SimpleTextAttributes#STYLE_STRIKEOUT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VirtualFileCellRenderer.java From intellij-reference-diagram with Apache License 2.0 | 6 votes |
public static void render(SimpleColoredComponent renderer, FileFQNReference ref, Project project) { VirtualFile virtualFile = ref.getPsiElement().getContainingFile().getVirtualFile(); PsiJavaFile psiFile = (PsiJavaFile) PsiManager.getInstance(project).findFile(virtualFile); int style = SimpleTextAttributes.STYLE_PLAIN; Color color = SimpleTextAttributes.LINK_BOLD_ATTRIBUTES.getFgColor(); Icon icon = getIcon(virtualFile); String comment = null; if (!virtualFile.isValid()) style |= SimpleTextAttributes.STYLE_STRIKEOUT; boolean fileHidden = isFileHidden(virtualFile); if (fileHidden) { color = HIDDEN; } ; renderer.setIcon(!fileHidden || icon == null ? icon : getTransparentIcon(icon)); SimpleTextAttributes attributes = new SimpleTextAttributes(style, color); renderer.append(psiFile.getPackageName() + "." + psiFile.getName(), attributes); renderer.append(" " + ref.toUsageString(), new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, SimpleTextAttributes.GRAY_ATTRIBUTES.getFgColor())); if (comment != null) renderer.append(comment, attributes); }
Example 2
Source File: LineParser.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static Object toStyle(String str) { switch (str) { case "1": return SimpleTextAttributes.STYLE_BOLD; case "3": return SimpleTextAttributes.STYLE_ITALIC; case "4": return SimpleTextAttributes.STYLE_UNDERLINE; case "9": return SimpleTextAttributes.STYLE_STRIKEOUT; case "30": return JBColor.BLACK; case "31": return JBColor.RED; case "32": return JBColor.GREEN; case "33": return JBColor.YELLOW; case "34": return JBColor.BLUE; case "35": return JBColor.MAGENTA; case "36": return JBColor.CYAN; case "37": return JBColor.WHITE; case "38": return JBColor.GRAY; default: return null; } }
Example 3
Source File: LineParser.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static Object toStyle(String str) { switch (str) { case "1": return SimpleTextAttributes.STYLE_BOLD; case "3": return SimpleTextAttributes.STYLE_ITALIC; case "4": return SimpleTextAttributes.STYLE_UNDERLINE; case "9": return SimpleTextAttributes.STYLE_STRIKEOUT; case "30": return JBColor.BLACK; case "31": return JBColor.RED; case "32": return JBColor.GREEN; case "33": return JBColor.YELLOW; case "34": return JBColor.BLUE; case "35": return JBColor.MAGENTA; case "36": return JBColor.CYAN; case "37": return JBColor.WHITE; case "38": return JBColor.GRAY; default: return null; } }
Example 4
Source File: InspectionTree.java From consulo with Apache License 2.0 | 4 votes |
public static SimpleTextAttributes patchAttr(InspectionTreeNode node, SimpleTextAttributes attributes) { if (node.isResolved()) { return new SimpleTextAttributes(attributes.getBgColor(), attributes.getFgColor(), attributes.getWaveColor(), attributes.getStyle() | SimpleTextAttributes.STYLE_STRIKEOUT); } return attributes; }