public boolean isWorkingArea(){ return station.isWorkingArea(); } }
public boolean isWorkingArea(){ return station.isWorkingArea(); } }
public boolean ignoreChildren( DockStation station ) { CStation<?> cstation = getStation( station ); if( cstation != null ) return cstation.isWorkingArea(); return false; } public boolean ignoreChildren( PerspectiveStation station ){
public boolean ignoreChildren( DockStation station ) { CStation<?> cstation = getStation( station ); if( cstation != null ) return cstation.isWorkingArea(); return false; } public boolean ignoreChildren( PerspectiveStation station ){
if( station != null && station.isWorkingArea() ){ workingAreas.remove( station );
public void dockStationRegistering( DockController controller, DockStation station ){ if( station instanceof CommonDockStation<?,?>){ CommonDockStation<?, ?> common = (CommonDockStation<?, ?>)station; CStation<?> cstation = common.getStation(); String id = cstation.getUniqueId(); if( id.equals( area )){ if( cstation.isWorkingArea() ){ dockable.setWorkingArea( cstation ); } uninstall(); } } }
public void dockStationRegistering( DockController controller, DockStation station ){ if( station instanceof CommonDockStation<?,?>){ CommonDockStation<?, ?> common = (CommonDockStation<?, ?>)station; CStation<?> cstation = common.getStation(); String id = cstation.getUniqueId(); if( id.equals( area )){ if( cstation.isWorkingArea() ){ dockable.setWorkingArea( cstation ); } uninstall(); } } }
Map<DockStation, CStation<?>> stations = new HashMap<DockStation, CStation<?>>(); for( CStation<?> station : control.getOwner().getStations() ){ if( station.isWorkingArea() ){ stations.put( station.getStation(), station );
Map<DockStation, CStation<?>> stations = new HashMap<DockStation, CStation<?>>(); for( CStation<?> station : control.getOwner().getStations() ){ if( station.isWorkingArea() ){ stations.put( station.getStation(), station );
/** * Starting with <code>station</code>, and traversing the tree upwards, searches * the first {@link CStation} which is a {@link CStation#isWorkingArea() working area}. * @param station the station on which to start the search * @return the first working area (closest to <code>station</code>) */ public static CStation<?> getFirstWorkingArea( CStation<?> station ){ DockStation parent = station.getStation(); while( parent != null ){ if( parent instanceof CommonDockStation<?, ?> ){ CStation<?> cstation = ((CommonDockStation<?, ?>)parent).getStation(); if( cstation.isWorkingArea() ){ return cstation; } } Dockable child = parent.asDockable(); parent = child == null ? null : child.getDockParent(); } return null; }
/** * Starting with <code>station</code>, and traversing the tree upwards, searches * the first {@link CStation} which is a {@link CStation#isWorkingArea() working area}. * @param station the station on which to start the search * @return the first working area (closest to <code>station</code>) */ public static CStation<?> getFirstWorkingArea( CStation<?> station ){ DockStation parent = station.getStation(); while( parent != null ){ if( parent instanceof CommonDockStation<?, ?> ){ CStation<?> cstation = ((CommonDockStation<?, ?>)parent).getStation(); if( cstation.isWorkingArea() ){ return cstation; } } Dockable child = parent.asDockable(); parent = child == null ? null : child.getDockParent(); } return null; }
/** * Checks all {@link CDockable}s and compares their * {@link CDockable#getWorkingArea() working area} * with <code>area</code>. * @param area a possible new parent * @param dockable the root of the tree of elements to test * @return <code>true</code> if all elements have <code>area</code> as * preferred parent, <code>false</code> otherwise */ private boolean match( CStation<?> area, Dockable dockable ){ if( dockable instanceof CommonDockable ){ if( getWorkingArea( dockable ) != area ) return false; } DockStation station = dockable.asDockStation(); if( station != null ){ if( dockable instanceof CommonDockable ){ CStation<?> cstation = ((CommonDockable)dockable).getStation(); if( cstation != null && cstation.isWorkingArea() ){ return true; } } return match( area, station ); } else return true; }
/** * Searches the first {@link CStation} with the working-area property set to <code>true</code> in the path to the root. * @param element some element * @return the first {@link CStation} that occurs on the path from * <code>element</code> to the root and which is a working area */ private CStation<?> searchArea( DockElement element ){ DockStation station = element.asDockStation(); Dockable dockable = element.asDockable(); while( dockable != null || station != null ){ if( station instanceof CommonDockStation<?, ?>){ CStation<?> cstation = ((CommonDockStation<?,?>)station).getStation(); if( cstation.isWorkingArea() ) return cstation; } dockable = station == null ? null : station.asDockable(); station = dockable == null ? null : dockable.getDockParent(); } return null; }
/** * Searches the first {@link CStation} with the woking-area property set to <code>true</code> in the path to the root. * @param element some element * @return the first {@link CStation} that occurs on the path from * <code>element</code> to the root and which is a working area */ private CStation<?> searchArea( DockElement element ){ DockStation station = element.asDockStation(); Dockable dockable = element.asDockable(); while( dockable != null || station != null ){ if( station != null && station instanceof CommonDockStation<?, ?>){ CStation<?> cstation = ((CommonDockStation<?,?>)station).getStation(); if( cstation.isWorkingArea() ) return cstation; } dockable = station == null ? null : station.asDockable(); station = dockable == null ? null : dockable.getDockParent(); } return null; }
if( dockable instanceof CommonDockable ){ CStation<?> cstation = ((CommonDockable)dockable).getStation(); if( cstation != null && cstation.isWorkingArea() ){ return true;
CStation<?> station = controlAccess.getOwner().getStation( areaId ); if( station != null ){ if( station.isWorkingArea() ){ dockable.setWorkingArea( station ); CStation<?> checkStation = check.asStation(); if( checkStation != null && checkStation.isWorkingArea() ){ if( checkStation.getUniqueId().equals( areaId )){
if( station.isWorkingArea() ){ valid = cnext.getWorkingArea() == station;
if( station.isWorkingArea() ){ valid = cnext.getWorkingArea() == station;
if( station != null ){ if( newMode.respectWorkingAreas( station.getStation() )){ if( station.isWorkingArea() ){ ((CommonDockable)dockable).getDockable().setWorkingArea( station );
if( station != null ){ if( newMode.respectWorkingAreas( station.getStation() )){ if( station.isWorkingArea() ){ ((CommonDockable)dockable).getDockable().setWorkingArea( station );