void (JComponent c, Graphics2D g, AbstractButton b, Rectangle iconRect, boolean selected, boolean enabled) { Graphics2D g2 = (Graphics2D)g.create(); try { ButtonModel bm = b.getModel(); String iconName = isIndeterminate(b) ? "checkBoxIndeterminate" : "checkBox"; DarculaUIUtil.Outline op = DarculaUIUtil.getOutline(b); boolean focused = op == null && c.hasFocus() || bm.isRollover() || isCellRollover(b); boolean pressed = bm.isPressed() || isCellPressed(b); Icon icon = WinIconLookup.getIcon(iconName, selected || isIndeterminate(b), focused, enabled, false, pressed); icon.paintIcon(c, g, iconRect.x, iconRect.y); if (op != null) { op.setGraphicsColor(g2, b.hasFocus()); Path2D outline = new Path2D.Float(Path2D.WIND_EVEN_ODD); outline.append(new Rectangle2D.Float(iconRect.x - JBUIScale.scale(1), iconRect.y - JBUIScale.scale(1), JBUIScale.scale(15), JBUIScale.scale(15)), false); outline.append(new Rectangle2D.Float(iconRect.x + JBUIScale.scale(1), iconRect.y + JBUIScale.scale(1), JBUIScale.scale(11), JBUIScale.scale(11)), false); g2.fill(outline); } } finally { g2.dispose(); } }