/** * 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 ); } } } }
if( area != null && area.asDockable() != null ){ if( !area.asDockable().isVisible() ){ throw new IllegalStateException( "A dockable that wants to be on a working-area can't be made visible unless the working-area is visible." );
if( area != null && area.asDockable() != null ){ if( !area.asDockable().isVisible() ){ throw new IllegalStateException( "A dockable that wants to be on a CWorkingArea can't be made visible unless the CWorkingArea is visible." );
@SuppressWarnings("unchecked") public CommonDockStationLayout getLayout( CommonDockStation<?, ?> element, Map<Dockable, Integer> children ){ String factoryId = element.getConverterID(); DockFactory<DockElement, ?, ?> factory = (DockFactory<DockElement, ?, ?>)control.intern().getDockFactory( factoryId ); if( factory == null ){ return null; } Object layout = factory.getLayout( element, children ); if( layout == null ){ return null; } CDockable dockable = element.getStation().asDockable(); String id = null; if( dockable instanceof SingleCDockable ){ id = ((SingleCDockable)dockable).getUniqueId(); } boolean root = control.isRootStation( element.getStation() ); return new CommonDockStationLayout( id, root, factoryId, new DockLayout<Object>( factoryId, layout ) ); }
@SuppressWarnings("unchecked") public CommonDockStationLayout getLayout( CommonDockStation<?, ?> element, Map<Dockable, Integer> children ){ String factoryId = element.getConverterID(); DockFactory<DockElement, ?, ?> factory = (DockFactory<DockElement, ?, ?>)control.intern().getDockFactory( factoryId ); if( factory == null ){ return null; } Object layout = factory.getLayout( element, children ); if( layout == null ){ return null; } CDockable dockable = element.getStation().asDockable(); String id = null; if( dockable instanceof SingleCDockable ){ id = ((SingleCDockable)dockable).getUniqueId(); } boolean root = control.isRootStation( element.getStation() ); return new CommonDockStationLayout( id, root, factoryId, new DockLayout<Object>( factoryId, layout ) ); }