/** * Unpacks any existing {@link DockStation} at location <code>x,y,width,height</code>. All children * of all {@link DockStation}s are removed and re-added as if {@link #addDockable(double, double, double, double, Object...)} * would have been called multiple times. * @param x the x-coordinate * @param y the y-coordinate * @param width the width, more than 0 * @param height the height, more than 0 */ public void unpack( double x, double y, double width, double height ){ Node<D> node = nodeAt( x, y, width, height ); if( node != null && node.dockables != null ){ List<D> copy = new ArrayList<D>(); for( D dockable : node.dockables ){ for( D unpacked : unpack( dockable )){ copy.add( unpacked ); } } D[] unpacked = copy.toArray( array( copy.size() )); node.dockables = unpacked; } }
unpack( x, y, width, height );
/** * Unpacks any existing {@link DockStation} at location <code>x,y,width,height</code>. All children * of all {@link DockStation}s are removed and re-added as if {@link #addDockable(double, double, double, double, Object...)} * would have been called multiple times. * @param x the x-coordinate * @param y the y-coordinate * @param width the width, more than 0 * @param height the height, more than 0 */ public void unpack( double x, double y, double width, double height ){ Node<D> node = nodeAt( x, y, width, height ); if( node != null && node.dockables != null ){ List<D> copy = new ArrayList<D>(); for( D dockable : node.dockables ){ for( D unpacked : unpack( dockable )){ copy.add( unpacked ); } } D[] unpacked = copy.toArray( array( copy.size() )); node.dockables = unpacked; } }
unpack( x, y, width, height );
unpack( x, y, width, height );
unpack( x, y, width, height );
unpack( x, y, width, height );
unpack( x, y, width, height );