public void removeMovieSet(MovieSet movieSet){
synchronized (root) {
    MovieSetTreeNode node=(MovieSetTreeNode)nodeMap.get(movieSet);
    int index=root.getIndex(node);
    movieSet.removePropertyChangeListener(propertyChangeListener);
    nodeMap.remove(movieSet);
    for (    Movie movie : movieSet.getMovies()) {
      nodeMap.remove(movie);
      movie.removePropertyChangeListener(propertyChangeListener);
    }
    node.removeAllChildren();
    node.removeFromParent();
    TreeModelEvent event=new TreeModelEvent(this,root.getPath(),new int[]{index},new Object[]{node});
    for (    TreeModelListener listener : listeners) {
      listener.treeNodesRemoved(event);
    }
  }
}

public void removeMovieSet ( MovieSet movieSet ) { synchronized ( root ) { MovieSetTreeNode node = ( MovieSetTreeNode ) nodeMap . get ( movieSet ) ; int index = root . getIndex ( node ) ; movieSet . removePropertyChangeListener ( propertyChangeListener ) ; nodeMap . remove ( movieSet ) ; for ( Movie movie : movieSet . getMovies ( ) ) { nodeMap . remove ( movie ) ; movie . removePropertyChangeListener ( propertyChangeListener ) ; } node . removeAllChildren ( ) ; node . removeFromParent ( ) ; TreeModelEvent event = new TreeModelEvent ( this , root . getPath ( ) , new int [ ] { index } , new Object [ ] { node } ) ; for ( TreeModelListener listener : listeners ) { listener . treeNodesRemoved ( event ) ; } } }
removes the movie set .
