public double getDivider( SplitDockProperty property ){ double divider = 0.5; if( bestNodePut == PutInfo.Put.LEFT ) { divider = property.getWidth() / bestNode.getWidth(); } else if( bestNodePut == PutInfo.Put.RIGHT ) { divider = 1 - property.getWidth() / bestNode.getWidth(); } else if( bestNodePut == PutInfo.Put.TOP ) { divider = property.getHeight() / bestNode.getHeight(); } else if( bestNodePut == PutInfo.Put.BOTTOM ) { divider = 1 - property.getHeight() / bestNode.getHeight(); } return Math.max(0, Math.min(1, divider)); } }
public double getDivider( SplitDockProperty property ){ double divider = 0.5; if( bestNodePut == PutInfo.Put.LEFT ) { divider = property.getWidth() / bestNode.getWidth(); } else if( bestNodePut == PutInfo.Put.RIGHT ) { divider = 1 - property.getWidth() / bestNode.getWidth(); } else if( bestNodePut == PutInfo.Put.TOP ) { divider = property.getHeight() / bestNode.getHeight(); } else if( bestNodePut == PutInfo.Put.BOTTOM ) { divider = 1 - property.getHeight() / bestNode.getHeight(); } return Math.max(0, Math.min(1, divider)); } }
double y = node.getY(); double width = node.getWidth(); double height = node.getHeight();
double y = node.getY(); double width = node.getWidth(); double height = node.getHeight();
/** * Gets a {@link SplitDockProperty} that works as backup property * if the referenced placeholder is not found. * @param target the node that asks for this location * @return the location, not <code>null</code> */ public SplitDockProperty toSplitLocation( SplitNode target ){ if( backup instanceof SplitDockProperty ) return (SplitDockProperty)backup; if( backup instanceof SplitDockPathProperty ) return ((SplitDockPathProperty)backup).toLocation( target ); SplitDockProperty result = new SplitDockProperty( target.getX(), target.getY(), target.getWidth(), target.getHeight() ); result.setSuccessor( getSuccessor() ); return result; }
other.getMinimumSize(), Orientation.VERTICAL, other.getWidth(), other.getHeight() ); item.getMinimumSize(), Orientation.VERTICAL, other.getWidth(), other.getHeight() ); other.getMinimumSize(), Orientation.HORIZONTAL, other.getWidth(), other.getHeight() ); item.getMinimumSize(), Orientation.HORIZONTAL, other.getWidth(), other.getHeight() );
other.getMinimumSize(), Orientation.VERTICAL, other.getWidth(), other.getHeight() ); item.getMinimumSize(), Orientation.VERTICAL, other.getWidth(), other.getHeight() ); other.getMinimumSize(), Orientation.HORIZONTAL, other.getWidth(), other.getHeight() ); item.getMinimumSize(), Orientation.HORIZONTAL, other.getWidth(), other.getHeight() );