package _VisualDVM.TestingSystem.SAPFOR.SapforTasksPackage.UI;
import Common.Visual.Trees.StyledTreeCellRenderer;

import javax.swing.*;
public class RendererTreeSapforVersions extends StyledTreeCellRenderer {
    public java.awt.Component getTreeCellRendererComponent(
            JTree tree, Object value,
            boolean selected, boolean expanded,
            boolean leaf, int row, boolean hasFocus) {
        super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
        if (value instanceof SapforPackageTreeNode) {
            SapforPackageTreeNode node = (SapforPackageTreeNode) value;
            setForeground(tree.getForeground());
            setFont(getFont().deriveFont((float) 14.0));
            if (node.getIcon() != null)
                setIcon(node.getIcon());
        }
        return this;
    }
}
