if (parent == null || (pn != null && pn.isChildrenRendered())) {
SafeHtmlBuilder sb = new SafeHtmlBuilder();
int parentDepth = parent == null ? 0 : store.getDepth(parent);
for (M child : event.getItems()) {
TreeViewRenderMode mode = !bufferRender ? TreeViewRenderMode.ALL : TreeViewRenderMode.BUFFER_WRAP;
sb.append(renderChild(parent, child, parentDepth, mode));
}
int index = event.getIndex();
int parentChildCount = parent == null ? store.getRootCount() : store.getChildCount(parent);