Exemple #1
0
 protected void removeChild(Node out) {
   Validate.isTrue(out.parentNode == this);
   int index = out.siblingIndex();
   childNodes.remove(index);
   reindexChildren();
   out.parentNode = null;
 }
Exemple #2
0
 protected void addChildren(int index, Node... children) {
   Validate.noNullElements(children);
   for (int i = children.length - 1; i >= 0; i--) {
     Node in = children[i];
     reparentChild(in);
     childNodes.add(index, in);
   }
   reindexChildren();
 }