/** * Changes the orientation of this node. * @param orientation the new orientation */ public void setOrientation( Orientation orientation ) { if( orientation == null ) throw new NullPointerException( "orientation must not be null" ); this.orientation = orientation; getAccess().getOwner().revalidate(); }
private Dimension getSize( Dimension left, Dimension right ){ if( left != null && right != null ){ int divider = getAccess().getOwner().getDividerSize(); if( orientation == Orientation.HORIZONTAL ){ return new Dimension( left.width + divider + right.width, Math.max( left.height, right.height )); } else{ return new Dimension( Math.max( left.width, right.width ), left.height + divider + right.height ); } } else if( left != null ){ return left; } else if( right != null ){ return right; } else{ return new Dimension(); } }
/** * 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 ); }
int dividerSize = getAccess().getOwner().getDividerSize();
double factorW = root.getWidthFactor(); double factorH = root.getHeightFactor(); int dividerSize = getAccess().getOwner().getDividerSize();
int dividerSize = getAccess().getOwner().getDividerSize();
return false; getAccess().getPlaceholderSet().set( null, placeholder, this ); leaf.setPlaceholders( getPlaceholders() ); Node node = createNode( -1 );
return getAccess().drop( dockable, property.toLocation( this ), this );