nextWidth = myEmptyPainter.getSize().width;
}
- if (row == 0 && table.getRowCount() == 1) {
- customizeRefsPainter(myEmptyPainter, ContainerUtil.emptyList(), foreground, myLogData, myComponent);
- }
myWidth = Math.max(Math.max(prevWidth, nextWidth), LabelPainter.GRADIENT_WIDTH);
}
}
public void paint(@NotNull Graphics2D g2, int x, int y, int height) {
GraphicsConfig config = GraphicsUtil.setupAAPainting(g2);
-
- myEmptyPainter.paintFadeOut(g2, x, y, myWidth, height);
-
+ LabelPainter.paintFadeOut(g2, x, y, myWidth, height, myComponent.getBackground());
config.restore();
}
g2.setFont(getReferenceFont());
g2.setStroke(new BasicStroke(1.5f));
- x = paintFadeOut(g2, x, y, myWidth, height);
+ x = paintFadeOut(g2, x, y, myWidth, height, myBackground);
FontMetrics fontMetrics = g2.getFontMetrics();
for (Pair<String, LabelIcon> label : myLabels) {
config.restore();
}
- public int paintFadeOut(@NotNull Graphics2D g2, int x, int y, int width, int height) {
- g2.setPaint(
- new GradientPaint(x, y, new Color(myBackground.getRed(), myBackground.getGreen(), myBackground.getBlue(), 0), x + GRADIENT_WIDTH, y,
- myBackground));
+ public static int paintFadeOut(@NotNull Graphics2D g2, int x, int y, int width, int height, @NotNull Color background) {
+ //noinspection UseJBColor
+ g2.setPaint(new GradientPaint(x, y,
+ new Color(background.getRed(), background.getGreen(), background.getBlue(), 0),
+ x + GRADIENT_WIDTH, y,
+ background));
g2.fill(new Rectangle(x, y, GRADIENT_WIDTH, height));
x += GRADIENT_WIDTH;
- g2.setColor(myBackground);
+ g2.setColor(background);
g2.fillRect(x, y, width - GRADIENT_WIDTH, height);
return x;
}