@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 (isProject(value)) {
                setIcon(projectIcon);
                setToolTipText(null);
                expanded = true;
            } else if (isClassesCollection(value)) {
                setIcon(classesIcon);
                setToolTipText(null);
                expanded = true;
                hasFocus = false;
            } else {
                // it's a class
                setIcon(classIcon);
                DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
                String nodeInfo = node.toString();
                setToolTipText(nodeInfo);
            }

            return this;
        }