/** * First {@link #add(MultipleCDockable) adds} <code>dockable</code> to the * {@link CControl} of this {@link CWorkingArea}, then makes it visible at a good position. A good position * is {@link CLocation#aside()} the latest focused {@link Dockable} that is child of this station. <br> * This method does <b>not</b> force a focus transfer, clients need to call {@link AbstractCDockable#toFront()} * if the require a focus switch to <code>dockable</code>. * @param dockable the element to show * @return <code>dockable</code> */ public <F extends MultipleCDockable> F show( F dockable ){ add( dockable ); dockable.setLocationsAsideFocused(); dockable.setVisible( true ); return dockable; }
/** * First {@link #add(MultipleCDockable) adds} <code>dockable</code> to the * {@link CControl} of this {@link CWorkingArea}, then makes it visible at a good position. A good position * is {@link CLocation#aside()} the latest focused {@link Dockable} that is child of this station. <br> * This method does <b>not</b> force a focus transfer, clients need to call {@link AbstractCDockable#toFront()} * if the require a focus switch to <code>dockable</code>. * @param dockable the element to show * @return <code>dockable</code> */ public <F extends MultipleCDockable> F show( F dockable ){ add( dockable ); dockable.setLocationsAsideFocused(); dockable.setVisible( true ); return dockable; }
/** * Removes a dockable from this control. The dockable is made invisible. * @param dockable the element to remove */ public void removeDockable( MultipleCDockable dockable ){ if( dockable == null ) throw new NullPointerException( "dockable must not be null" ); if( dockable.getControl() == this ){ dockable.setVisible( false ); frontend.remove( dockable.intern() ); register.removeMultipleDockable( dockable ); dockable.setControlAccess( null ); for( CControlListener listener : listeners() ) listener.removed( CControl.this, dockable ); } }
/** * Removes a dockable from this control. The dockable is made invisible. * @param dockable the element to remove */ public void removeDockable( MultipleCDockable dockable ){ if( dockable == null ) throw new NullPointerException( "dockable must not be null" ); if( dockable.getControl() == this ){ dockable.setVisible( false ); frontend.remove( dockable.intern() ); register.removeMultipleDockable( dockable ); dockable.setControlAccess( null ); for( CControlListener listener : listeners() ) listener.removed( CControl.this, dockable ); } }