List of usage examples for javax.swing.text StyledDocument getRootElements
public Element[] getRootElements();
From source file:com.hexidec.ekit.EkitCore.java
/** * Method for describing the node hierarchy of the document *//*from ww w. j ava2 s.co m*/ private void describeDocument(StyledDocument doc) { Element[] elements = doc.getRootElements(); for (Element elem : elements) { indent = indentStep; StringBuilder sb = new StringBuilder(); for (int j = 0; j < indent; j++) { sb.append(" "); } sb.append(elem); traverseElement(elem, sb); log.debug(sb); } }