当前位置: 首页>>代码示例>>Java>>正文


Java Gray._128属性代码示例

本文整理汇总了Java中com.intellij.ui.Gray._128属性的典型用法代码示例。如果您正苦于以下问题:Java Gray._128属性的具体用法?Java Gray._128怎么用?Java Gray._128使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.intellij.ui.Gray的用法示例。


在下文中一共展示了Gray._128属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: paintComponent

@Override
protected void paintComponent(final Graphics g) {
  final Insets i = getInsets();
  if (UIUtil.isUnderAquaBasedLookAndFeel() || UIUtil.isUnderDarcula()) {
    if (getParent() != null) {
      final JBColor col = new JBColor(Gray._128, Gray._111);
      final Graphics2D g2 = (Graphics2D)g;
      if (myOrientation == SwingConstants.HORIZONTAL) {
        UIUtil.drawDoubleSpaceDottedLine(g2, i.top + 2, getParent().getSize().height - 2 - i.top - i.bottom, 3, col, false);
      } else {
        UIUtil.drawDoubleSpaceDottedLine(g2, i.left + 2, getParent().getSize().width - 2 - i.left - i.right, 3, col, true);
      }
    }
  }
  else {
    g.setColor(UIUtil.getSeparatorColor());
    if (getParent() != null) {
      if (myOrientation == SwingConstants.HORIZONTAL) {
        UIUtil.drawLine(g, 3, 2, 3, getParent().getSize().height - 2);
      }
      else {
        UIUtil.drawLine(g, 2, 3, getParent().getSize().width - 2, 3);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:ActionToolbarImpl.java

示例2: makeStatusFragment

private ColoredFragment makeStatusFragment(boolean prefix) {
  int style = SimpleTextAttributes.STYLE_PLAIN;
  if (config.projectViewStatusBold) {
    style |= SimpleTextAttributes.STYLE_BOLD;
  }
  if (config.projectViewStatusItalic) {
    style |= SimpleTextAttributes.STYLE_ITALIC;
  }
  Color color = config.projectViewStatusCustomColor ? config.getProjectViewStatusColor() : Gray._128;
  SimpleTextAttributes attributes = new SimpleTextAttributes(style, color);
  StringBand status = getStatusText();
  if (prefix) {
    String statusTemp = status.toString();
    status.setIndex(0);
    status.append(FontUtil.spaceAndThinSpace()).append(statusTemp);
  }
  return new ColoredFragment(status.toString(), attributes);
}
 
开发者ID:zielu,项目名称:GitToolBox,代码行数:18,代码来源:ColoredNodeDecoration.java

示例3: paintMacThumb

private void paintMacThumb(Graphics g, Rectangle thumbBounds) {
  if (isMacScrollbarHiddenAndXcodeLikeScrollbar()) return;

  thumbBounds = getMacScrollBarBounds(thumbBounds, true);
  Graphics2D g2d = (Graphics2D)g;
  RenderingHints oldHints = g2d.getRenderingHints();
  g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

  JBColor baseColor = new JBColor(new NotNullProducer<Color>() {
    @NotNull
    @Override
    public Color produce() {
      return !isDark() ? Gray._0 : Gray._128;
    }
  });
  
  int arc = Math.min(thumbBounds.width, thumbBounds.height);

  if (alwaysPaintThumb()) {
    //noinspection UseJBColor
    g2d.setColor(new Color(baseColor.getRed(), baseColor.getGreen(), baseColor.getBlue(), isDark() ? 100 : 40));
    g2d.fillRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc);
    //g2d.drawRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc);
  }

  if (!myMacScrollbarHidden) {
    g2d.setColor(adjustColor(baseColor));
    g2d.fillRoundRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, arc, arc);
  }
  g2d.setRenderingHints(oldHints);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:ButtonlessScrollBarUI.java

示例4: paintComponent

@Override
protected void paintComponent(final Graphics g) {
  final Insets i = getInsets();
  if (UIUtil.isUnderAquaBasedLookAndFeel() || UIUtil.isUnderDarcula()) {
    if (getParent() != null) {
      final JBColor col = new JBColor(Gray._128, Gray._111);
      final Graphics2D g2 = (Graphics2D)g;
      if (myOrientation == SwingConstants.HORIZONTAL) {
        UIUtil.drawDoubleSpaceDottedLine(g2, i.top + 2, getParent().getSize().height - 2 - i.top - i.bottom, 3, col, false);
      }
      else {
        UIUtil.drawDoubleSpaceDottedLine(g2, i.left + 2, getParent().getSize().width - 2 - i.left - i.right, 3, col, true);
      }
    }
  }
  else {
    g.setColor(UIUtil.getSeparatorColor());
    if (getParent() != null) {
      if (myOrientation == SwingConstants.HORIZONTAL) {
        UIUtil.drawLine(g, 3, 2, 3, getParent().getSize().height - 2);
      }
      else {
        UIUtil.drawLine(g, 2, 3, getParent().getSize().width - 2, 3);
      }
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:27,代码来源:ActionToolbarImpl.java

示例5: getBackgroundColor

@NotNull
private static Color getBackgroundColor(@NotNull EditorColorsScheme scheme) {
  Color color = scheme.getColor(BACKGROUND);
  return color != null ? color : Gray._128;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DiffLineSeparatorRenderer.java

示例6: getTableCellRendererComponent

@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
  Component orig = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
  if (myPluginDescriptor != null) {
    final PluginNode pluginNode = (PluginNode)myPluginDescriptor;
    myNameLabel.setText(myPluginDescriptor.getName());

    final Color fg = orig.getForeground();
    final Color bg = orig.getBackground();
    final Color grayedFg = isSelected ? fg : new JBColor(Color.DARK_GRAY, Gray._128);
    myNameLabel.setForeground(fg);
    myStatusLabel.setForeground(grayedFg);
    

    myPanel.setBackground(bg);
    myNameLabel.setBackground(bg);
    myNameLabel.setIcon(AllIcons.Nodes.Plugin);
    String category = myPluginDescriptor.getCategory();
    if (category != null) {
      myCategoryLabel.setText(category);
      myCategoryLabel.setForeground(grayedFg);
    }
    final IdeaPluginDescriptor installed = PluginManager.getPlugin(pluginNode.getPluginId());
    if (isDownloaded(pluginNode) || (installed != null && InstalledPluginsTableModel.wasUpdated(installed.getPluginId()))) {
      if (!isSelected) myNameLabel.setForeground(FileStatus.ADDED.getColor());
      myStatusLabel.setText("[Downloaded]");
      myPanel.setToolTipText(IdeBundle.message("plugin.download.status.tooltip"));
      myStatusLabel.setBorder(BorderFactory.createEmptyBorder(0, LEFT_MARGIN, 0, 0));
    }
    else if (pluginNode.getStatus() == PluginNode.STATUS_INSTALLED) {
      PluginId pluginId = pluginNode.getPluginId();
      final boolean hasNewerVersion = InstalledPluginsTableModel.hasNewerVersion(pluginId);
      if (!isSelected) myNameLabel.setForeground(FileStatus.MODIFIED.getColor());
      if (hasNewerVersion) {
        if (!isSelected){
          myNameLabel.setForeground(JBColor.RED);
        }
        myNameLabel.setIcon(AllIcons.Nodes.Pluginobsolete);
      }
      myStatusLabel.setText("v." + pluginNode.getInstalledVersion() + (hasNewerVersion ? (" -> " + pluginNode.getVersion()) : ""));
      myStatusLabel.setBorder(BorderFactory.createEmptyBorder(0, LEFT_MARGIN, 0, 0));
    }
  }
  return myPanel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:45,代码来源:AvailablePluginColumnInfo.java

示例7: getBackgroundColor

@Nonnull
private static Color getBackgroundColor(@Nonnull EditorColorsScheme scheme) {
  Color color = scheme.getColor(BACKGROUND);
  return color != null ? color : Gray._128;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:DiffLineSeparatorRenderer.java


注:本文中的com.intellij.ui.Gray._128属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。