本文整理匯總了Java中com.intellij.ui.SimpleTextAttributes.GRAY_ATTRIBUTES屬性的典型用法代碼示例。如果您正苦於以下問題:Java SimpleTextAttributes.GRAY_ATTRIBUTES屬性的具體用法?Java SimpleTextAttributes.GRAY_ATTRIBUTES怎麽用?Java SimpleTextAttributes.GRAY_ATTRIBUTES使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.intellij.ui.SimpleTextAttributes
的用法示例。
在下文中一共展示了SimpleTextAttributes.GRAY_ATTRIBUTES屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawAnswerPlaceholderFromPrevStep
public static void drawAnswerPlaceholderFromPrevStep(@NotNull Editor editor, int start, int end) {
EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme();
Color color = scheme.getColor(EditorColors.TEARLINE_COLOR);
SimpleTextAttributes attributes = SimpleTextAttributes.GRAY_ATTRIBUTES;
final TextAttributes textAttributes = new TextAttributes(attributes.getFgColor(), color, null,
null, attributes.getFontStyle());
drawAnswerPlaceholder(editor, start, end, textAttributes, HighlighterLayer.LAST);
}
示例2: forJdk
@NotNull
@Override
public CellAppearanceEx forJdk(@Nullable final Sdk jdk, final boolean isInComboBox, final boolean selected, final boolean showVersion) {
if (jdk == null) {
return FileAppearanceService.getInstance().forInvalidUrl(NO_JDK);
}
String name = jdk.getName();
CompositeAppearance appearance = new CompositeAppearance();
SdkType sdkType = (SdkType)jdk.getSdkType();
appearance.setIcon(sdkType.getIcon());
SimpleTextAttributes attributes = getTextAttributes(sdkType.sdkHasValidPath(jdk), selected);
CompositeAppearance.DequeEnd ending = appearance.getEnding();
ending.addText(name, attributes);
if (showVersion) {
String versionString = jdk.getVersionString();
if (versionString != null && !versionString.equals(name)) {
SimpleTextAttributes textAttributes = isInComboBox && !selected ? SimpleTextAttributes.SYNTHETIC_ATTRIBUTES :
SystemInfo.isMac && selected ? new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN,
Color.WHITE): SimpleTextAttributes.GRAY_ATTRIBUTES;
ending.addComment(versionString, textAttributes);
}
}
return ending.getAppearance();
}