本文整理汇总了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);
}
示例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;
}
示例3: getActiveFg
@Override
protected Color getActiveFg(boolean selected) {
if (contentManager().getContentCount() > 1 && selected) {
return Gray._255;
}
return super.getActiveFg(selected);
}
示例4: getPassiveFg
@Override
protected Color getPassiveFg(boolean selected) {
if (contentManager().getContentCount() > 1 && selected && !UIUtil.isUnderDarcula()) {
return Gray._255;
}
return super.getPassiveFg(selected);
}
示例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);
}
示例6: produce
@NotNull
@Override
public Color produce() {
return UIUtil.isUnderDarcula() ? UIUtil.getPanelBackground() : Gray._255;
}
示例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);
}
示例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()));
}
示例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()));
}
示例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;
}