Example #1
0
  void removeChild(Node child) {
    if (_id_ == child) {
      _id_ = null;
      return;
    }

    if (_arrow_ == child) {
      _arrow_ = null;
      return;
    }

    if (_prodTransform_.remove(child)) {
      return;
    }

    if (_alts_.remove(child)) {
      return;
    }
  }
Example #2
0
  void replaceChild(Node oldChild, Node newChild) {
    if (_id_ == oldChild) {
      setId((TId) newChild);
      return;
    }

    if (_arrow_ == oldChild) {
      setArrow((TArrow) newChild);
      return;
    }

    for (ListIterator i = _prodTransform_.listIterator(); i.hasNext(); ) {
      if (i.next() == oldChild) {
        if (newChild != null) {
          i.set(newChild);
          oldChild.parent(null);
          return;
        }

        i.remove();
        oldChild.parent(null);
        return;
      }
    }

    for (ListIterator i = _alts_.listIterator(); i.hasNext(); ) {
      if (i.next() == oldChild) {
        if (newChild != null) {
          i.set(newChild);
          oldChild.parent(null);
          return;
        }

        i.remove();
        oldChild.parent(null);
        return;
      }
    }
  }
Example #3
0
 public void setAlts(List list) {
   _alts_.clear();
   _alts_.addAll(list);
 }
Example #4
0
 public void setProdTransform(List list) {
   _prodTransform_.clear();
   _prodTransform_.addAll(list);
 }