public Component getTreeCellRendererComponent( JTree tree, Object value, boolean sel,
            boolean expanded, boolean leaf, int row, boolean hasFocus ) {
        
        if ( value instanceof LeafNode ) {
            JPanel panel = new JPanel();
            String text = ( ( (LeafNode) value ).getItem() ).toString();
            panel.add( new JLabel( text ) );
            panel.setBackground( new Color( 0, 0, 0, 0 ) );
            panel.setEnabled( tree.isEnabled() );
            return panel;
        }
        else {
            super.getTreeCellRendererComponent( tree, value, sel, expanded, leaf, row, hasFocus );

            // Custom folder icon
            if ( value instanceof FolderNode ) {
                if ( expanded ) {
                    if ( ( (FolderNode) value ).isAutoDL() )
                        setIcon( openFolderSelIcon );
                    else
                        setIcon( openFolderIcon );
                }
                else {
                    if ( ( (FolderNode) value ).isAutoDL() )
                        setIcon( closedFolderSelIcon );
                    else
                        setIcon( closedFolderIcon );
                }
            }
            // Root icon
            else if ( ( (DefaultMutableTreeNode) value ).isRoot() )
                setIcon( putioIcon );

            setBorder( BorderFactory.createEmptyBorder( 2, 2, 2, 2 ) );

            if ( sel ) {
                if ( ( (DefaultMutableTreeNode) value ).isRoot() ) {
                    setBackgroundSelectionColor( null );
                    setForeground( Color.BLACK );
                }
                else {
                    setBackgroundSelectionColor( colorSel );
                }
                setBorderSelectionColor( null );
            }

            return this;
        }
    }