if (mySub.getRemovedList().hasMoreElements ()) { Enumeration removedtasks = mySub.getRemovedList(); while (removedtasks.hasMoreElements()) { Task t = (Task) removedtasks.nextElement(); if (xxdebug) System.out.println ("UTILExpandableTaskCallback : Telling listener that task " + t.getUID() + " was removed."); ((UTILGenericListener) myListener).handleRemovedTask(t); } }
  public void reactToChangedFilter () {    Enumeration newtasks = mySub.getAddedList();    boolean anythingChanged = newtasks.hasMoreElements();    int i = 0;    while (newtasks.hasMoreElements()) {      Task t = (Task) newtasks.nextElement();      if (isWellFormed (t)) {	((UTILGenericListener) myListener).handleTask (t);	if (xxdebug) 	  System.out.println ("UTILExpandableTaskCallback : Notifying " + myListener + 			      " about " + t.getUID());	i++;      }    }    Enumeration changedTasks = mySub.getChangedList();    if (!anythingChanged)      anythingChanged = changedTasks.hasMoreElements();    while (changedTasks.hasMoreElements()) {      Task changedT = (Task)changedTasks.nextElement();      if (isWellFormed (changedT)) {	((UTILGenericListener) myListener).handleTask(changedT);	System.out.println ("UTILExpandableTaskCallback : Notifying " + myListener + 			    " about changed task " + changedT.getUID());	i++;      }    }    if (anythingChanged)      synchronized (myListener) {	if (xxdebug)	  System.out.println ("UTILExpandableTaskCallback : Notifying " + myListener + 			      " about " + i + 			      " tasks");	myListener.notify ();      }    if (xxdebug) {      if (mySub.getRemovedList().hasMoreElements ()) {	Enumeration removedtasks = mySub.getRemovedList();	while (removedtasks.hasMoreElements()) {	  Task t = (Task) removedtasks.nextElement();	  System.out.println ("UTILExpandableTaskCallback : Expandable task " + t + 			      " was removed from container.");	}      }    }  }