@Override
public void paint(Graphics g, JComponent c) {
JTree tree = (JTree) c;
if(tree.isOpaque()){
g.setColor(tree.getBackground());
g.fillRect(0, 0, tree.getWidth(), tree.getHeight());
}
if (tree.getSelectionCount() > 0) {
g.setColor(ColorController.COR_DESTAQUE);
for (int i : tree.getSelectionRows()) {
Rectangle r = tree.getRowBounds(i);
g.fillRect(0, r.y, tree.getWidth(), r.height);
}
}
super.paint(g, c);
if (tree.getLeadSelectionPath() != null) {
Rectangle r = tree.getRowBounds(getRowForPath(tree, tree.getLeadSelectionPath()));
g.setColor(tree.hasFocus() ? ColorController.FUNDO_MEDIO.brighter(): ColorController.FUNDO_MEDIO);
}
}