void (@NotNull Graphics2D g, float startXf, float endXf, int height, Color c1, Color c2) { Graphics2D g2 = (Graphics2D)g.create(); try { g2.setPaint(getGradientPaint(startXf, 2, c1, startXf, height - 5, c2)); if (JreHiDpiUtil.isJreHiDPI(g2)) { GraphicsUtil.setupRoundedBorderAntialiasing(g2); g2.fill(new RoundRectangle2D.Float(startXf, 2, endXf - startXf, height - 4, 5, 5)); } else { int startX = (int)startXf; int endX = (int)endXf; g2.fillRect(startX, 3, endX - startX, height - 5); boolean drawRound = endXf - startXf > 4; if (drawRound) { LinePainter2D.paint(g2, startX - 1, 4, startX - 1, height - 4); LinePainter2D.paint(g2, endX, 4, endX, height - 4); g2.setColor(new Color(100, 100, 100, 50)); LinePainter2D.paint(g2, startX - 1, 4, startX - 1, height - 4); LinePainter2D.paint(g2, endX, 4, endX, height - 4); LinePainter2D.paint(g2, startX, 3, endX - 1, 3); LinePainter2D.paint(g2, startX, height - 3, endX - 1, height - 3); } } } finally { g2.dispose(); } }