@Override public SplitNode getChild( int location ){ if( location == 0 ){ return getChild(); } return null; }
@Override protected SplitNode getRootChild( SplitNode root ){ return ((Root)root).getChild(); }
@Override protected SplitNode getRootChild( SplitNode root ){ return ((Root)root).getChild(); }
/** * Creates a new root-element * @param layout the layout that uses this root * @param root the root which is represented by this root-element */ public ResizeRoot( LockedResizeLayoutManager<T> layout, Root root ){ super( null, layout ); this.root = root; this.child[0] = layout.toElement( this, root.getChild() ); }
/** * Creates a new root-element * @param layout the layout that uses this root * @param root the root which is represented by this root-element */ public ResizeRoot( LockedResizeLayoutManager<T> layout, Root root ){ super( null, layout ); this.root = root; this.child[0] = layout.toElement( this, root.getChild() ); }
public Leaf getLastLeafOfColumn(){ SplitNode node = root; while( node != null ){ if( node instanceof Root ){ node = ((Root)node).getChild(); } else if( node instanceof Node ){ node = ((Node)node).getRight(); } else if( node instanceof Leaf ){ return (Leaf)node; } else { node = null; } } return null; }
node = ((Root)node).getChild();
preferredSize = column.getPreferredSize( ((Root) node).getChild() );
minimumSize = column.getMinimumSize( ((Root) node).getChild() );
/** * Gets the number of gaps between the leafs of this cell * @return the number of gaps */ public int getGaps(){ if( node instanceof Leaf ) { return 0; } if( node instanceof Node ) { int left = column.getGaps( ((Node) node).getLeft() ); int right = column.getGaps( ((Node) node).getRight() ); if( left == -1 ) { return right; } if( right == -1 ) { return left; } if( left == -1 && right == -1 ) { return -1; } return left + 1 + right; } else if( node instanceof Root ) { return column.getGaps( ((Root) node).getChild() ); } else { return -1; } } }
if( SplitNode.above( 0, station.getHeight(), station.getWidth(), 0, x, y )){ info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.TOP, drop, false ); info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.RIGHT, drop, false ); if( SplitNode.above( 0, station.getHeight(), station.getWidth(), 0, x, y )){ info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.LEFT, drop, false ); info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.BOTTOM, drop, false ); if( leaf != null && station.getRoot().getChild() instanceof Node){ 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 )
if( SplitNode.above( 0, station.getHeight(), station.getWidth(), 0, x, y )){ info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.TOP, drop, false ); info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.RIGHT, drop, false ); if( SplitNode.above( 0, station.getHeight(), station.getWidth(), 0, x, y )){ info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.LEFT, drop, false ); info = new PutInfo( station.getRoot().getChild(), PutInfo.Put.BOTTOM, drop, false ); if( leaf != null && station.getRoot().getChild() instanceof Node){ 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 )
node = ((Root)node).getChild();
return applyPersistentSizes( ((Root)node).getChild(), column, map );
return applyPersistentSizes( ((Root)node).getChild(), map );
if( node != null && node.isVisible() ) { if( node instanceof Root ) { updateBounds( ((Root) node).getChild(), x, y, width, height, map );