/** * Adds a new set of {@link CDockable}s to this grid. The {@link CDockable}s * are also added to the {@link CControl} of this <code>CGrid</code>. * @param x the x-coordinate of the dockables * @param y the y-coordinate of the dockables * @param width the width of the dockables * @param height the height of the dockables * @param dockables a list of {@link SingleCDockable}s and {@link MultipleCDockable}s. */ public void add( double x, double y, double width, double height, CDockable... dockables ){ Dockable[] intern = new Dockable[ dockables.length ]; for( int i = 0; i < intern.length; i++ ){ CDockable dockable = dockables[i]; if( control != null ){ if( dockable instanceof SingleCDockable ){ control.addDockable( (SingleCDockable)dockable ); } else if( dockable instanceof MultipleCDockable ){ if( dockable.getControl() == null ){ control.addDockable( (MultipleCDockable)dockable ); } } } intern[i] = dockable.intern(); } grid.addDockable( x, y, width, height, intern ); }
/** * Adds a new set of {@link CDockable}s to this grid. The {@link CDockable}s * are also added to the {@link CControl} of this <code>CGrid</code>. * @param x the x-coordinate of the dockables * @param y the y-coordinate of the dockables * @param width the width of the dockables * @param height the height of the dockables * @param dockables a list of {@link SingleCDockable}s and {@link MultipleCDockable}s. */ public void add( double x, double y, double width, double height, CDockable... dockables ){ Dockable[] intern = new Dockable[ dockables.length ]; for( int i = 0; i < intern.length; i++ ){ CDockable dockable = dockables[i]; if( control != null ){ if( dockable instanceof SingleCDockable ){ control.addDockable( (SingleCDockable)dockable ); } else if( dockable instanceof MultipleCDockable ){ if( dockable.getControl() == null ){ control.addDockable( (MultipleCDockable)dockable ); } } } intern[i] = dockable.intern(); } grid.addDockable( x, y, width, height, intern ); }