Esempio n. 1
0
 /*
  * @see org.primordion.xholon.base.IXholon#removeChild()
  */
 public void removeChild() {
   if (!isRootNode()) {
     XholonTreeNode lNode = getPreviousSibling();
     XholonTreeNode rNode = getNextSibling();
     if (lNode == null) { // this is the first (leftmost) sibling
       if (rNode == null) {
         getParentNode().setFirstChild(null);
       } else {
         getParentNode().setFirstChild(rNode); // nextSibling is new firstChild of parent
       }
     } else {
       if (rNode == null) {
         lNode.setNextSibling(null);
       } else {
         lNode.setNextSibling(rNode);
       }
     }
     setParentNode(null);
     setNextSibling(null);
   }
 }
Esempio n. 2
0
 /*
  * @see org.primordion.xholon.base.IXholon#setParentSiblingLinks(org.primordion.xholon.base.TreeNode)
  */
 public void setParentSiblingLinks(XholonTreeNode previousSibling) {
   setParentNode(previousSibling.getParentNode()); // previousSibling already has parent
   previousSibling.setNextSibling(this);
 }
Esempio n. 3
0
 /*
  * @see org.primordion.xholon.base.IXholon#setParentChildLinks()
  */
 public void setParentChildLinks(XholonTreeNode parent) {
   setParentNode(parent);
   parent.setFirstChild(this);
 }