本文整理匯總了Java中com.intellij.ui.SimpleTextAttributes.STYLE_STRIKEOUT屬性的典型用法代碼示例。如果您正苦於以下問題:Java SimpleTextAttributes.STYLE_STRIKEOUT屬性的具體用法?Java SimpleTextAttributes.STYLE_STRIKEOUT怎麽用?Java SimpleTextAttributes.STYLE_STRIKEOUT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.intellij.ui.SimpleTextAttributes
的用法示例。
在下文中一共展示了SimpleTextAttributes.STYLE_STRIKEOUT屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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;
}
示例2: getTextAttributes
@Override
protected SimpleTextAttributes getTextAttributes(final JTree tree) {
return new SimpleTextAttributes(
getPsiDocCommentOwner().isDeprecated() ? SimpleTextAttributes.STYLE_STRIKEOUT : SimpleTextAttributes.STYLE_PLAIN,
tree.getForeground());
}
示例3: makeStrikeout
private static SimpleTextAttributes makeStrikeout(SimpleTextAttributes nameAttributes) {
return new SimpleTextAttributes(nameAttributes.getStyle() | SimpleTextAttributes.STYLE_STRIKEOUT, nameAttributes.getFgColor());
}
示例4: patchAttr
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;
}