@Override protected Orientation getOrientation( SplitNode node ){ return ((Node)node).getOrientation(); }
@Override protected Orientation getOrientation( SplitNode node ){ return ((Node)node).getOrientation(); }
@Override public void handleNode( Node node ){ switch( node.getOrientation() ){ case HORIZONTAL: node.setOrientation( Orientation.VERTICAL ); break; case VERTICAL: node.setOrientation( Orientation.HORIZONTAL ); break; } }
/** * Gets the space the divider needs right now. * @return the space the divider occupies now */ public double getNewDividerSize(){ if( node.getOrientation() == Orientation.HORIZONTAL ) return getDividerWidth(); else return getDividerHeight(); }
/** * Gets the space the divider needs right now. * @return the space the divider occupies now */ public double getNewDividerSize(){ if( node.getOrientation() == Orientation.HORIZONTAL ) return getDividerWidth(); else return getDividerHeight(); }
@Override public void prepareResize() { super.prepareResize(); if( node.getOrientation() == Orientation.HORIZONTAL ) dividerSize = getDividerWidth(); else dividerSize = getDividerHeight(); }
@Override public void prepareResize() { super.prepareResize(); if( node.getOrientation() == Orientation.HORIZONTAL ) dividerSize = getDividerWidth(); else dividerSize = getDividerHeight(); }
public double validateDivider( SplitDockStation station, double divider, Node node ){ divider = Math.min( 1, Math.max( 0, divider )); SplitNode left = node.getLeft(); SplitNode right = node.getRight(); Dimension leftMin = null; Dimension rightMin = null; if( left != null ){ leftMin = left.getMinimumSize(); } if( right != null ){ rightMin = right.getMinimumSize(); } if( leftMin == null ){ leftMin = new Dimension(); } if( rightMin == null ){ rightMin = new Dimension(); } return validateDivider( station, divider, leftMin, rightMin, node.getOrientation(), node.getWidth(), node.getHeight() ); }
public double validateDivider( SplitDockStation station, double divider, Node node ){ divider = Math.min( 1, Math.max( 0, divider )); SplitNode left = node.getLeft(); SplitNode right = node.getRight(); Dimension leftMin = null; Dimension rightMin = null; if( left != null ){ leftMin = left.getMinimumSize(); } if( right != null ){ rightMin = right.getMinimumSize(); } if( leftMin == null ){ leftMin = new Dimension(); } if( rightMin == null ){ rightMin = new Dimension(); } return validateDivider( station, divider, leftMin, rightMin, node.getOrientation(), node.getWidth(), node.getHeight() ); }
if( ((Node) node).getOrientation() == Orientation.HORIZONTAL ) { preferredSize = new Dimension( left.width + right.width, Math.max( left.height, right.height ) );
if( ((Node) node).getOrientation() == Orientation.HORIZONTAL ) { minimumSize = new Dimension( left.width + right.width, Math.max( left.height, right.height ) );
/** * Ensures that the dropped {@link Dockable} does not come to rest at a location that would destroy the columns. */ @Override public boolean drop( Dockable dockable, SplitDockPlaceholderProperty property ){ SplitNode node = getRoot().getPlaceholderNode( property.getPlaceholder() ); if( node != null && !(node instanceof Leaf) && !(node instanceof Root)){ if( node instanceof Placeholder || ((Node)node).getOrientation() == side.getHeaderOrientation() ){ pushIntoHeader( node ); } } return super.drop( dockable, property ); }
SplitNode parent = node.getParent(); if( parent instanceof Node ){ if( ((Node)parent).getOrientation() == Orientation.HORIZONTAL ){ if( put == Put.TOP || put == Put.BOTTOM ){ parent = null;
@Override protected ResizeRequest createRequest() { ResizeRequest alpha = getLeft().getRequest(); ResizeRequest beta = getRight().getRequest(); boolean horizontal = node.getOrientation() == Orientation.HORIZONTAL; if( horizontal ){ return getLayout().getConflictResolver().requestHorizontal( alpha, beta, this ); } else{ return getLayout().getConflictResolver().requestVertical( alpha, beta, this ); } }
@Override protected ResizeRequest createRequest() { ResizeRequest alpha = getLeft().getRequest(); ResizeRequest beta = getRight().getRequest(); boolean horizontal = node.getOrientation() == Orientation.HORIZONTAL; if( horizontal ){ return getLayout().getConflictResolver().requestHorizontal( alpha, beta, this ); } else{ return getLayout().getConflictResolver().requestVertical( alpha, beta, this ); } }
Node n = (Node)node; if( n.getOrientation() == side().getHeaderOrientation() ) { return false;
Node node = (Node)station.getRoot().getChild(); if( node.getLeft().isVisible() && node.getRight().isVisible() ){ if( info.getPut() == PutInfo.Put.TOP && node.getOrientation() == Orientation.VERTICAL && node.getLeft() == leaf ) return null; if( info.getPut() == PutInfo.Put.BOTTOM && node.getOrientation() == Orientation.VERTICAL && node.getRight() == leaf ) return null; if( info.getPut() == PutInfo.Put.LEFT && node.getOrientation() == Orientation.HORIZONTAL && node.getLeft() == leaf ) return null; if( info.getPut() == PutInfo.Put.RIGHT && node.getOrientation() == Orientation.HORIZONTAL && node.getRight() == leaf ) return null;
Node node = (Node)station.getRoot().getChild(); if( node.getLeft().isVisible() && node.getRight().isVisible() ){ if( info.getPut() == PutInfo.Put.TOP && node.getOrientation() == Orientation.VERTICAL && node.getLeft() == leaf ) return null; if( info.getPut() == PutInfo.Put.BOTTOM && node.getOrientation() == Orientation.VERTICAL && node.getRight() == leaf ) return null; if( info.getPut() == PutInfo.Put.LEFT && node.getOrientation() == Orientation.HORIZONTAL && node.getLeft() == leaf ) return null; if( info.getPut() == PutInfo.Put.RIGHT && node.getOrientation() == Orientation.HORIZONTAL && node.getRight() == leaf ) return null;
Node n = (Node) node; if( n.getLeft() != null && n.getLeft().isVisible() && n.getRight() != null && n.getRight().isVisible() ) { if( n.getOrientation() == Orientation.HORIZONTAL ) { double dividerWidth = factorW > 0 ? Math.max( 0, gap( n, map ) / factorW ) : 0.0; double dividerLocation = width * n.getDivider();
return isHeaderLevel( node.getParent(), recursive ); else if( n.getOrientation() == side().getHeaderOrientation() ) { return true;