Beispiel #1
0
 // </editor-fold>
 // <editor-fold defaultstate="collapsed" desc="fill pane content">
 @Override
 public void read(Reader in, Object desc) throws IOException {
   super.read(in, desc);
   Document doc = getDocument();
   Element root = doc.getDefaultRootElement();
   parse(root);
   setCaretPosition(0);
 }
Beispiel #2
0
 private void parse(Element node) {
   if (!showThumbs) {
     // do not show any thumbnails
     return;
   }
   int count = node.getElementCount();
   for (int i = 0; i < count; i++) {
     Element elm = node.getElement(i);
     Debug.log(8, elm.toString());
     if (elm.isLeaf()) {
       int start = elm.getStartOffset(), end = elm.getEndOffset();
       parseRange(start, end);
     } else {
       parse(elm);
     }
   }
 }