public void notifyDestroyViewer() throws CanceledException {
synchronized (directorListeners) {
    while (directorListeners.size() > 0) {
      IDirectorListener directorListener=directorListeners.get(0);
      if (directorListener != this)       directorListener.destroyView();
      if (directorListeners.size() > 0 && directorListeners.get(0) == directorListener)       directorListeners.remove(0);
    }
  }
  while (viewers.size() > 0) {
    removeViewer(viewers.get(0));
  }
  if (projectsChangedListener != null)   ProjectManager.removeProjectsChangedListener(projectsChangedListener);
  if (future != null && !future.isDone()) {
    try {
      future.cancel(true);
    }
 catch (    Exception ex) {
    }
    future=null;
  }
}

public void notifyDestroyViewer ( ) throws CanceledException { synchronized ( directorListeners ) { while ( directorListeners . size ( ) > 0 ) { IDirectorListener directorListener = directorListeners . get ( 0 ) ; if ( directorListener != this ) directorListener . destroyView ( ) ; if ( directorListeners . size ( ) > 0 && directorListeners . get ( 0 ) == directorListener ) directorListeners . remove ( 0 ) ; } } while ( viewers . size ( ) > 0 ) { removeViewer ( viewers . get ( 0 ) ) ; } if ( projectsChangedListener != null ) ProjectManager . removeProjectsChangedListener ( projectsChangedListener ) ; if ( future != null && ! future . isDone ( ) ) { try { future . cancel ( true ) ; } catch ( Exception ex ) { } future = null ; } }
notify all director event listeners to destroy themselves
