public SafeHtml getTemplate(M m, String id, SafeHtml text, ImageResource icon, boolean checkable, Joint joint,
int level) {
SafeHtmlBuilder sb = new SafeHtmlBuilder();
tree.getTreeAppearance().renderNode(sb, id, text, tree.getStyle(), icon, checkable, CheckState.UNCHECKED, joint,
level - 1, TreeViewRenderMode.ALL);
return sb.toSafeHtml();
}
/**
* Returns the element in which the node's text is rendered.
*