示例#1
0
 /**
  * Remove child from children list
  *
  * @param child
  */
 public void remove(Node child) {
   childrenList.remove(child);
   child.setParent(null);
 }
示例#2
0
 /**
  * Add one child and set child's parent to current node
  *
  * @param node new child
  */
 public void addNode(Node node) {
   childrenList.add(node);
   node.setParent(this);
 }
示例#3
0
 /**
  * Remove child at childIndex
  *
  * @param childIndex child indexs
  */
 public void remove(int childIndex) {
   Node child = getChildAt(childIndex);
   childrenList.remove(childIndex);
   child.setParent(null);
 }