Ejemplo n.º 1
0
 OutlineSpan nextSection(Node after) {
   for (Leaf l = after.getNextLeaf(); l != null; l = l.getNextLeaf()) {
     for (int i = 0, imax = l.sizeSticky(); i < imax; i++) {
       Mark m = l.getSticky(i);
       Object owner = m.getOwner();
       if (owner instanceof OutlineSpan && ((OutlineSpan) owner).getStart() == m) {
         return (OutlineSpan) owner;
         // System.out.println("found next active = "+l.getNextLeaf()+", owner="+owner);
       }
     }
   }
   return null;
 }
Ejemplo n.º 2
0
 OutlineSpan prevSection(Node before) {
   for (Leaf l = before.getPrevLeaf(); l != null; l = l.getPrevLeaf()) {
     for (int i = l.sizeSticky() - 1; i >= 0; i--) { // doesn't matte
       Mark m = l.getSticky(i);
       Object owner = m.getOwner();
       if (owner instanceof OutlineSpan && ((OutlineSpan) owner).getStart() == m) {
         return (OutlineSpan) owner;
         // System.out.println("found next active = "+l.getNextLeaf()+", owner="+owner);
       }
     }
   }
   return null;
 }