public ExtendedModeAcceptance( CControlAccess control ){
this.control = control;
}
public boolean accept( DockStation parent, Dockable child ) {
CLocationModeManager manager = control.getLocationManager();
if( manager.isOnTransaction() ){
CGroupMovement action = manager.getCurrentAction();
if( action == null || action.forceAccept( parent, child )){
return true;
}
}
CLocationModeManager locationManager = control.getLocationManager();
ExtendedMode mode = locationManager.childsExtendedMode( parent );
if( mode == null ){
// the parent is not yet known to anyone, so just hope
// that the developer has made the correct settings, because
// we cannot check them here.
return true;
}
return locationManager.isModeAvailable( child, mode );
}