String[] tags = new String[0]; // TODO fetch tags
panel.setBackground(isSelected ? getSelectionBackground() : getBackground());
box.setBackground(isSelected ? getSelectionBackground() : getBackground());
IRule rule = stylesheet.getRule(el, tags);
if (rule != null)
{
// Update font
Font fnt = rule.getFont();
boolean bold = fnt != null && fnt.isBold();
if (defFont.isBold() != bold) setFont(defFont.deriveFont(bold ? Font.BOLD : Font.PLAIN));
// Update color
if (!isSelected)
{
Color color = rule.getColor();
if (color == null) color = Color.BLACK;
setForeground(color);
}
// Assign icon
Icon icon = rule.getIcon();
setIcon(icon);
}
// checkbox.setFocusPainted(false);
// checkbox.setBorderPainted(true);