/** * Sets the left child of this node. The area of this child * will be in the left or the upper half of the area of this node.<br> * Note that setting the child to <code>null</code> does not delete * the child from the system, only a call to {@link SplitNode#delete(boolean)} * does that. * @param left the left child or <code>null</code> */ public void setLeft( SplitNode left ){ if( this.left != null ) this.left.setParent( null ); this.left = left; clearVisibility(); if( left != null ){ left.setParent( this ); } treeChanged(); if( left != null ){ ensureIdUniqueAsync(); } getAccess().getOwner().revalidate(); getAccess().getOwner().repaint(); getAccess().repositioned( this ); }
/** * Sets the right child of this node. The area of this child * will be in the right or the bottom half of the area of this * node.<br> * Note that setting the child to <code>null</code> does not delete * the child from the system, only a call to {@link SplitNode#delete(boolean)} * does that. * @param right the right child */ public void setRight( SplitNode right ){ if( this.right != null ) this.right.setParent( null ); this.right = right; clearVisibility(); if( right != null ){ right.setParent( this ); } treeChanged(); if( right != null ){ ensureIdUniqueAsync(); } getAccess().getOwner().revalidate(); getAccess().getOwner().repaint(); getAccess().repositioned( this ); }