Ejemplo n.º 1
0
 /**
  * Adds a TreeElement to this Nodes children-list
  *
  * @param element the TreeElemtn to be added to this Nodes children
  */
 public void add(final TreeElement element) {
   children.add(element);
   if (!(element instanceof DataObject)) {
     ((Node) element).setLevel(level - 1);
   }
   element.setParent(this);
   updateBoundingBox(element.getBoundingBox());
 }
Ejemplo n.º 2
0
 /**
  * Removes the specified TreeElemtent from the children list
  *
  * @param e The child to be removed
  */
 public void removeChild(final TreeElement e) {
   children.remove(e);
   e.setParent(null);
   refreshBoundingBox();
 }