Example #1
0
  /**
   * True iff one of node's <i>strict</i> descendants is folded. A node N is not its strict
   * descendant - the fact that node itself is folded is not sufficient to return true.
   */
  public boolean hasFoldedStrictDescendant() {

    for (ListIterator e = childrenUnfolded(); e.hasNext(); ) {
      NodeAdapter child = (NodeAdapter) e.next();
      if (child.isFolded() || child.hasFoldedStrictDescendant()) {
        return true;
      }
    }

    return false;
  }
Example #2
0
 /** Recursive Method for getPath() */
 private void addToPathVector(Vector pathVector) {
   pathVector.add(0, this); // Add myself to beginning of Vector
   if (parent != null) {
     ((NodeAdapter) parent).addToPathVector(pathVector);
   }
 }