public void added( CStationContainer source, CStation<?> station ){ try{ settingDefaultStations = source == content; control.addStation( station, true ); } finally{ settingDefaultStations = false; } } };
/** * Adds an additional station to this control. * @param station the new station */ public void addStation( CStation<?> station ){ addStation( station, true ); }
/** * Adds an additional station to this control. * @param station the new station */ public void addStation( CStation<?> station ){ addStation( station, true ); }
public void added( CStationContainer source, CStation<?> station ){ try{ settingDefaultStations = source == content; control.addStation( station, true ); } finally{ settingDefaultStations = false; } } };
/** * Creates a new area where minimized {@link CDockable}s can be stored. This * method adds the new area directly as a root station to this control. * @param uniqueId a unique identifier * @return the new area */ public CMinimizeArea createMinimizeArea( String uniqueId ){ CMinimizeArea area = new CMinimizeArea( this, uniqueId ); addStation( area, true ); return area; }
/** * Called during construction of this {@link CControl}, this method creates a new * {@link CExternalizeArea} and registers it as root-station using the unique identifier * {@value #EXTERNALIZED_STATION_ID}.<br> * Subclasses may override this method and not create a {@link CExternalizeArea} or create * a customized {@link CExternalizeArea}. */ protected void initExternalizeArea(){ addStation( new CExternalizeArea( this, EXTERNALIZED_STATION_ID ), true ); }
/** * Creates a new area where minimized {@link CDockable}s can be stored. This * method adds the new area directly as a root station to this control. * @param uniqueId a unique identifier * @return the new area */ public CMinimizeArea createMinimizeArea( String uniqueId ){ CMinimizeArea area = new CMinimizeArea( this, uniqueId ); addStation( area, true ); return area; }
/** * Called during construction of this {@link CControl}, this method creates a new * {@link CExternalizeArea} and registers it as root-station using the unique identifier * {@value #EXTERNALIZED_STATION_ID}.<br> * Subclasses may override this method and not create a {@link CExternalizeArea} or create * a customized {@link CExternalizeArea}. */ protected void initExternalizeArea(){ addStation( new CExternalizeArea( this, EXTERNALIZED_STATION_ID ), true ); }
/** * Creates and adds a new {@link CWorkingArea} to this control. The area * is not made visible by this method. * @param uniqueId the unique id of the area * @return the new area */ public CWorkingArea createWorkingArea( String uniqueId ){ CWorkingArea area = new CWorkingArea( this, uniqueId ); addDockable( area ); addStation( area, true ); return area; }
/** * Creates and adds a new {@link CWorkingArea} to this control. The area * is not made visible by this method. * @param uniqueId the unique id of the area * @return the new area */ public CWorkingArea createWorkingArea( String uniqueId ){ CWorkingArea area = new CWorkingArea( this, uniqueId ); addDockable( area ); addStation( area, true ); return area; }
public void addStationContainer( CStationContainer container ){ if( container == null ) throw new NullPointerException( "container is null" ); if( containers.contains( container )) throw new IllegalArgumentException( "container already registered" ); for( CStationContainer child : containers ){ if( child.getUniqueId().equals( container.getUniqueId() )){ throw new IllegalArgumentException( "A container with unique id '" + container.getUniqueId() + "' is already registered" ); } } containers.add( container ); try{ settingDefaultStations = container == content; for( int i = 0, n = container.getStationCount(); i<n; i++ ){ control.addStation( container.getStation( i ), true ); } } finally{ settingDefaultStations = false; } container.addStationContainerListener( containerListener ); }
public void addStationContainer( CStationContainer container ){ if( container == null ) throw new NullPointerException( "container is null" ); if( containers.contains( container )) throw new IllegalArgumentException( "container already registered" ); for( CStationContainer child : containers ){ if( child.getUniqueId().equals( container.getUniqueId() )){ throw new IllegalArgumentException( "A container with unique id '" + container.getUniqueId() + "' is already registered" ); } } containers.add( container ); try{ settingDefaultStations = container == content; for( int i = 0, n = container.getStationCount(); i<n; i++ ){ control.addStation( container.getStation( i ), true ); } } finally{ settingDefaultStations = false; } container.addStationContainerListener( containerListener ); }
/** * Creates a new area where normalized {@link CDockable}s can be stored. * This method adds the new area directly as a root station to this control * @param uniqueId a unique identifier * @return the new area */ public CGridArea createGridArea( String uniqueId ){ CGridArea area = new CGridArea( this, uniqueId ); addStation( area, true ); if( frontend.getDefaultStation() == null ) frontend.setDefaultStation( area.getStation() ); return area; }
/** * Creates a new area where normalized {@link CDockable}s can be stored. * This method adds the new area directly as a root station to this control * @param uniqueId a unique identifier * @return the new area */ public CGridArea createGridArea( String uniqueId ){ CGridArea area = new CGridArea( this, uniqueId ); addStation( area, true ); if( frontend.getDefaultStation() == null ) frontend.setDefaultStation( area.getStation() ); return area; }
/** * Register <code>station</code> at the {@link CControl} in whose realm this factory works. * @param station the station to register * @param root whether to set the root flag or not */ protected void registerStation( CStation<?> station, boolean root ){ if( control.getStation( station.getUniqueId() ) != station ){ control.addStation( station, root ); } CDockable dockable = station.asDockable(); if( dockable != null ){ if( dockable instanceof SingleCDockable ){ SingleCDockable single = (SingleCDockable)dockable; if( control.getSingleDockable( single.getUniqueId() ) != single ){ control.addDockable( single ); } } } }
/** * Register <code>station</code> at the {@link CControl} in whose realm this factory works. * @param station the station to register * @param root whether to set the root flag or not */ protected void registerStation( CStation<?> station, boolean root ){ if( control.getStation( station.getUniqueId() ) != station ){ control.addStation( station, root ); } CDockable dockable = station.asDockable(); if( dockable != null ){ if( dockable instanceof SingleCDockable ){ SingleCDockable single = (SingleCDockable)dockable; if( control.getSingleDockable( single.getUniqueId() ) != single ){ control.addDockable( single ); } } } }