Esempio n. 1
0
  public void cleanup() {
    for (int i = 0; i < children.size(); i++) {
      Fold child = (Fold) children.elementAt(i);
      child.cleanup();
    }

    shallowCleanup();
  }
Esempio n. 2
0
  public void remove(int start, int end) {
    Vector temp = new Vector(children);
    for (int i = 0; i < temp.size(); i++) {
      Fold f = (Fold) temp.elementAt(i);

      if (f.contains(start) || f.contains(end)) {
        f.remove(start, end);
        children.removeElement(f);

        Vector childs = f.getChildren();
        for (int j = 0; j < childs.size(); j++) {
          children.addElement(childs.elementAt(j));
        }

        f.shallowCleanup();
      }
    }
  }