@Override
    public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
        super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);

        if (!(value instanceof Resource))
            return this;
        Resource r = (Resource) value;

        if (r instanceof ProjectResource)
            setIcon(projectIcon);
        else if (r instanceof NodeResource)
            setIcon(nodeIcon);
        else if (r instanceof NodeJumpResource)
            setIcon(jumpIcon);
        else if (r instanceof NodeAttributeResource)
            setIcon(attributeIcon);

        return this;
    }