Ejemplo n.º 1
0
  /** Make the given child the new parent. */
  public void enterChild(int index) {
    currentChild = currentParent.getChild();
    while ((currentChild != null) && (index != 0)) {
      index--;
      currentChild = currentChild.getSibling();
    }

    if (currentChild != null) {
      currentParent = currentChild;
      currentChild = currentParent.getChild();
    }
  }
Ejemplo n.º 2
0
 public void next() {
   currentChild = currentChild.getSibling();
 }