void (IFilterEditor editor, boolean isSelected, JComponent c, Graphics g) { if (icon != null) { Icon use; if (c.isEnabled()) { use = icon; } else { use = UIManager.getLookAndFeel().getDisabledIcon(c, icon); } FontMetrics metrics = g.getFontMetrics(); // FontMetrics metrics = g.getFontMetrics(editor.getLook().getCustomChoiceDecorator().getFont(this, editor, isSelected)); int x = Math.max(4 + metrics.stringWidth(toString()), (c.getWidth() - use.getIconWidth()) / 2); int y = (c.getHeight() - use.getIconHeight()) / 2; use.paintIcon(c, g, x, y); } }