return tmb;
}
private void addElement(CustomTreeNode elementNode, Element element) {
CustomTreeNode tnb;
if (element.isValue()) {
tnb = new CustomTreeNode("valueElement", element.getName(), false);
// if (this.defaultBg) {
// tnb.getStyleAttributes().put("color", "#D5EDFF");
// } else {
// tnb.getStyleAttributes().put("color", "#FEEFB4");
// }
// this.defaultBg = !this.defaultBg;
} else {
tnb = new CustomTreeNode("element", element.getName(), false);
}
tnb.setContent(element);
elementNode.getChildren().add(tnb);
tnb.setParent(elementNode);
if (!(element.isValue())) {
List attributes = element.getAttributes();
for (Iterator attrIt = attributes.iterator(); attrIt.hasNext(); ) {
Attribute currentAttr = (Attribute) attrIt.next();
CustomTreeNode attributeTreeNode = new CustomTreeNode("attribute", currentAttr.getName(), false);
attributeTreeNode.setContent(currentAttr);
attributeTreeNode.setParent(tnb);
tnb.getChildren().add(attributeTreeNode);
}
List childElements = element.getElements();
for( Iterator elementsIt = childElements.iterator(); elementsIt.hasNext(); ) {