Element parentElement = doc.getElementById("treeCustomId");
ElementTreeNodeStructure structure = FirstLevelTreeStructure.SINGLETON;
ElementTreeNodeRenderer renderer = FirstLevelTreeRenderer.SINGLETON;
ElementGroupManager factory = itsNatDoc.getElementGroupManager();
ElementTreeNodeList tree = factory.createElementTreeNodeList(false,parentElement,true,structure,renderer);
String[] name;
ElementTreeNode treeNode;
ElementTreeNodeList nodeList;
name = new String[] { "Jose", "Arranz" };
treeNode = tree.addTreeNode(name);
nodeList = treeNode.getChildTreeNodeList();
nodeList.setElementTreeNodeStructure(SecondLevelTreeStructure.SINGLETON);
nodeList.setElementTreeNodeRenderer(SecondLevelTreeRenderer.SINGLETON);
nodeList.addTreeNode("Andr�s");
nodeList.addTreeNode("Pepa");
name = new String[] { "Antonio", "P�rez" };
treeNode = tree.addTreeNode(name);
nodeList = treeNode.getChildTreeNodeList();
nodeList.setElementTreeNodeStructure(SecondLevelTreeStructure.SINGLETON);
nodeList.setElementTreeNodeRenderer(SecondLevelTreeRenderer.SINGLETON);
nodeList.addTreeNode("Sergio");
nodeList.addTreeNode("Luis");
// Otra alternativa es detectar el nivel y usar una sola clase estructura y renderer
// que funcionan de forma diferente segun el nivel.
}