Icon (boolean hovered) { if (null == getActionOnClick()) { icon.setFont(RelativeFont.SMALL.derive(getFont())); icon.setBackground(getForeground()); icon.setForeground(getBackground()); return icon; } return hovered ? AllIcons.Actions.CloseHovered : AllIcons.Actions.Close; }