void (Graphics2D g, Rectangle r, JComponent c, boolean fillBackground) { Graphics2D g2 = (Graphics2D)g.create(); try { g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, MacUIUtil.USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE : RenderingHints.VALUE_STROKE_NORMALIZE); g2.translate(r.x, r.y); float arc = ARC.getFloat(); float lw = LW(g2); float bw = BW.getFloat(); Shape outerShape = new RoundRectangle2D.Float(bw, bw, r.width - bw * 2, r.height - bw * 2, arc, arc); if (fillBackground) { g2.setColor(c.getBackground()); g2.fill(outerShape); } Path2D path = new Path2D.Float(Path2D.WIND_EVEN_ODD); path.append(outerShape, false); path.append(new RoundRectangle2D.Float( bw + lw, bw + lw, r.width - (bw + lw) * 2, r.height - (bw + lw) * 2, arc - lw, arc - lw), false); g2.setColor(OUTLINE_COLOR); g2.fill(path); if (c.hasFocus()) { DarculaUIUtil.Outline op = DarculaUIUtil.getOutline(c); if (op != null) { DarculaUIUtil.paintOutlineBorder(g2, r.width, r.height, arc, true, true, op); } else { DarculaUIUtil.paintFocusBorder(g2, r.width, r.height, arc, true); } } } finally { g2.dispose(); } }