當前位置: 首頁>>代碼示例>>Java>>正文


Java SimpleTextAttributes.GRAY_ATTRIBUTES屬性代碼示例

本文整理匯總了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);
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:9,代碼來源:EduAnswerPlaceholderPainter.java

示例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();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:27,代碼來源:OrderEntryAppearanceServiceImpl.java


注:本文中的com.intellij.ui.SimpleTextAttributes.GRAY_ATTRIBUTES屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。