Пример #1
0
 /*
  * @see org.primordion.xholon.base.IXholon#appendChild(org.primordion.xholon.base.IXholon)
  */
 public void appendChild(XholonTreeNode newParentNode) {
   if (newParentNode.getFirstChild() == null) {
     setParentChildLinks(newParentNode);
   } else {
     setParentSiblingLinks(newParentNode.getLastChild());
   }
 }
Пример #2
0
 /*
  * @see org.primordion.xholon.base.IXholon#insertAfter(org.primordion.xholon.base.IXholon)
  */
 public void insertAfter(XholonTreeNode newLeftSibling) {
   if (newLeftSibling.hasNextSibling()) {
     parent = newLeftSibling.getParentNode();
     nextSibling = newLeftSibling.getNextSibling();
     newLeftSibling.setNextSibling(this);
   } else { // last sibling
     setParentSiblingLinks(newLeftSibling);
   }
 }