public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus){
        Component renderer = delegate.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
        if(!showRootNodeCheckBox && tree.getModel().getRoot()==value)
            return renderer;

        TreePath path = tree.getPathForRow(row);
        if(path!=null){
            if(selectionModel.isPathSelected(path, selectionModel.isDigged()))
                checkBox.getTristateModel().setState(TristateState.SELECTED);
            else
                checkBox.getTristateModel().setState(selectionModel.isDigged() && selectionModel.isPartiallySelected(path) ? TristateState.INDETERMINATE : TristateState.DESELECTED);
        }
        removeAll();
        add(checkBox, BorderLayout.WEST);
        add(renderer, BorderLayout.CENTER);
        return this;
    }