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


Java Gray._255属性代码示例

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


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

示例1: getPassiveFg

@Override
protected Color getPassiveFg(boolean selected) {
  if (contentManager().getContentCount() > 1) {
     return selected && !UIUtil.isUnderDarcula() ? Gray._255 : UIUtil.isUnderDarcula()? UIUtil.getLabelDisabledForeground() : Gray._75;
   }
   return super.getPassiveFg(selected);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ContentTabLabel.java

示例2: getArrowColor

private Color getArrowColor() {
  Color color = null;
  if (isUsingDarculaUiFlavor()) {
    color =
        isEnabled()
            ? new JBColor(Gray._255, getForeground())
            : new JBColor(Gray._255, getForeground().darker());
  }
  if (color == null) {
    color = getForeground();
  }

  return color;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:14,代码来源:CustomizableComboBox.java

示例3: getActiveFg

@Override
protected Color getActiveFg(boolean selected) {
  if (contentManager().getContentCount() > 1 && selected) {
    return Gray._255;
  }
  return super.getActiveFg(selected);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:ContentTabLabel.java

示例4: getPassiveFg

@Override
protected Color getPassiveFg(boolean selected) {
  if (contentManager().getContentCount() > 1 && selected && !UIUtil.isUnderDarcula()) {
    return Gray._255;
  }
  return super.getPassiveFg(selected);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:ContentTabLabel.java

示例5: getPassiveFg

@Override
protected Color getPassiveFg(boolean selected) {
  if (contentManager().getContentCount() > 1) {
    return selected && !UIUtil.isUnderDarcula() ? Gray._255 : UIUtil.isUnderDarcula()? UIUtil.getLabelDisabledForeground() : Gray._75;
  }
  return super.getPassiveFg(selected);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:ContentTabLabel.java

示例6: produce

@NotNull
@Override
public Color produce() {
  return UIUtil.isUnderDarcula() ? UIUtil.getPanelBackground() : Gray._255;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ContentRootPanel.java

示例7: paintSelectionAndBorder

@Override
protected void paintSelectionAndBorder(Graphics2D g2d) {
  if (getSelectedInfo() == null) return;
  final boolean dark = UIUtil.isUnderDarcula();
  final Color col = dark ? ColorUtil.shift(UIUtil.getListBackground(), 1.6) : Gray._255;
  final Color panelBg = dark ? ColorUtil.shift(UIUtil.getPanelBackground(), 1.3) : UIUtil.getPanelBackground();

  TabLabel label = getSelectedLabel();
  Rectangle r = label.getBounds();
  r = new Rectangle(r.x, r.y + 3, r.width, r.height - 3);

  ShapeInfo selectedShape = _computeSelectedLabelShape(r);

  Insets insets = getTabsBorder().getEffectiveBorder();
  Insets i = selectedShape.path.transformInsets(insets);

  int _x = r.x;
  int _y = r.y;
  int _height = r.height;

  if (!isHideTabs()) {
    g2d.setPaint(UIUtil.getGradientPaint(_x, _y, col, _x, _y + _height - 3, panelBg));

    g2d.fill(selectedShape.fillPath.getShape());

    g2d.setColor(ColorUtil.toAlpha(col, 180));
    g2d.draw(selectedShape.fillPath.getShape());

    // fix right side due to swing stupidity (fill & draw will occupy different shapes)
    g2d.draw(selectedShape.labelPath
               .transformLine(selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1), selectedShape.labelPath.getY() +
                                                                                                     selectedShape.labelPath.deltaY(1),
                              selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1), selectedShape.labelPath.getMaxY() -
                                                                                                     selectedShape.labelPath.deltaY(4)));
  }
  if (UIUtil.isUnderDarcula()) return;
  g2d.setColor(panelBg);
  g2d.fillRect(2, selectedShape.labelPath.getMaxY() - 2, selectedShape.path.getMaxX() - 2, 3);
  g2d.drawLine(1, selectedShape.labelPath.getMaxY(), 1, getHeight() - 1);
  g2d.drawLine(selectedShape.path.getMaxX() - 1, selectedShape.labelPath.getMaxY() - 4,
               selectedShape.path.getMaxX() - 1, getHeight() - 1);

  if (isHideTabs()) return;
  g2d.setColor(Gray._0.withAlpha(50));
  g2d.drawLine(1, selectedShape.labelPath.getMaxY(), 1, getHeight() - 1);
  g2d.drawLine(selectedShape.path.getMaxX() - 1, selectedShape.labelPath.getMaxY() - 4,
               selectedShape.path.getMaxX() - 1, getHeight() - 1);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:48,代码来源:JBRunnerTabs.java

示例8: paintSelectionAndBorderImpl

@Override
public void paintSelectionAndBorderImpl(Graphics2D g2d,
                                        Rectangle rect,
                                        IntelliJEditorTabsUI.ShapeInfo selectedShape,
                                        Insets insets,
                                        Color tabColor,
                                        boolean horizontalTabs) {
  Insets i = selectedShape.path.transformInsets(insets);

  if (!horizontalTabs) {
    g2d.setColor(new Color(0, 0, 0, 45));
    g2d.draw(selectedShape.labelPath
                     .transformLine(i.left, selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4), selectedShape.path.getMaxX(),
                                    selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));

    g2d.setColor(new Color(0, 0, 0, 15));
    g2d.draw(selectedShape.labelPath
                     .transformLine(i.left, selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(5), selectedShape.path.getMaxX(),
                                    selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(5)));
  }

  tabColor = tabColor != null ? tabColor : Gray._255;
  g2d.setColor(multiplyColor(tabColor));
  g2d.fill(selectedShape.fillPath.getShape());

  g2d.setColor(Gray._255.withAlpha(180));
  g2d.draw(selectedShape.fillPath.getShape());

  // fix right side due to swing stupidity (fill & draw will occupy different shapes)
  g2d.draw(selectedShape.labelPath.transformLine(selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1),
                                                 selectedShape.labelPath.getY() + selectedShape.labelPath.deltaY(1),
                                                 selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1),
                                                 selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));

  if (!horizontalTabs) {
    // side shadow
    g2d.setColor(Gray._0.withAlpha(30));
    g2d.draw(selectedShape.labelPath.transformLine(selectedShape.labelPath.getMaxX() + selectedShape.labelPath.deltaX(1),
                                                   selectedShape.labelPath.getY() + selectedShape.labelPath.deltaY(1),
                                                   selectedShape.labelPath.getMaxX() + selectedShape.labelPath.deltaX(1),
                                                   selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));


    g2d.draw(selectedShape.labelPath.transformLine(selectedShape.labelPath.getX() - selectedShape.labelPath.deltaX(horizontalTabs ? 2 : 1),
                                                   selectedShape.labelPath.getY() + selectedShape.labelPath.deltaY(1),
                                                   selectedShape.labelPath.getX() - selectedShape.labelPath.deltaX(horizontalTabs ? 2 : 1),
                                                   selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));
  }

  g2d.setColor(new Color(0, 0, 0, 50));
  g2d.draw(selectedShape.labelPath.transformLine(i.left, selectedShape.labelPath.getMaxY(), selectedShape.path.getMaxX(), selectedShape.labelPath.getMaxY()));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:52,代码来源:MacEditorTabsUI.java

示例9: paintSelectionAndBorderImpl

public void paintSelectionAndBorderImpl(Graphics2D g2d,
                                        Rectangle rect,
                                        IntelliJEditorTabsUI.ShapeInfo selectedShape,
                                        Insets insets,
                                        Color tabColor,
                                        boolean horizontalTabs) {
  Insets i = selectedShape.path.transformInsets(insets);

  if (!horizontalTabs) {
    g2d.setColor(new Color(0, 0, 0, 45));
    g2d.draw(selectedShape.labelPath
                     .transformLine(i.left, selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4), selectedShape.path.getMaxX(),
                                    selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));

    g2d.setColor(new Color(0, 0, 0, 15));
    g2d.draw(selectedShape.labelPath
                     .transformLine(i.left, selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(5), selectedShape.path.getMaxX(),
                                    selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(5)));
  }

  tabColor = tabColor != null ? tabColor : Gray._255;
  g2d.setColor(multiplyColor(tabColor));
  g2d.fill(selectedShape.fillPath.getShape());

  g2d.setColor(Gray._255.withAlpha(180));
  g2d.draw(selectedShape.fillPath.getShape());

  // fix right side due to swing stupidity (fill & draw will occupy different shapes)
  g2d.draw(selectedShape.labelPath.transformLine(selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1),
                                                 selectedShape.labelPath.getY() + selectedShape.labelPath.deltaY(1),
                                                 selectedShape.labelPath.getMaxX() - selectedShape.labelPath.deltaX(1),
                                                 selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));

  if (!horizontalTabs) {
    // side shadow
    g2d.setColor(Gray._0.withAlpha(30));
    g2d.draw(selectedShape.labelPath.transformLine(selectedShape.labelPath.getMaxX() + selectedShape.labelPath.deltaX(1),
                                                   selectedShape.labelPath.getY() + selectedShape.labelPath.deltaY(1),
                                                   selectedShape.labelPath.getMaxX() + selectedShape.labelPath.deltaX(1),
                                                   selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));


    g2d.draw(selectedShape.labelPath.transformLine(selectedShape.labelPath.getX() - selectedShape.labelPath.deltaX(horizontalTabs ? 2 : 1),
                                                   selectedShape.labelPath.getY() + selectedShape.labelPath.deltaY(1),
                                                   selectedShape.labelPath.getX() - selectedShape.labelPath.deltaX(horizontalTabs ? 2 : 1),
                                                   selectedShape.labelPath.getMaxY() - selectedShape.labelPath.deltaY(4)));
  }

  g2d.setColor(new Color(0, 0, 0, 50));
  g2d.draw(selectedShape.labelPath.transformLine(i.left, selectedShape.labelPath.getMaxY(), selectedShape.path.getMaxX(), selectedShape.labelPath.getMaxY()));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:51,代码来源:ModernWhiteEditorTabsUI.java

示例10: getCaretColor

private static Color getCaretColor(final Editor editor) {
  Color overriddenColor = editor.getCaretModel().getPrimaryCaret().getVisualAttributes().getColor();
  if (overriddenColor != null) return overriddenColor;
  final Color caretColor = editor.getColorsScheme().getColor(EditorColors.CARET_COLOR);
  return caretColor == null ? new JBColor(Gray._0, Gray._255) : caretColor;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:ImmediatePainter.java


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