13a14,15 > import CH.ifa.draw.framework.DrawingView; > 14a17,17 > import java.util.Iterator; 20,20c23,23 < * @author Wolfram Kaiser --- > * @author Wolfram Kaiser 186a190,217 > > /** > * Removes all undo activities that operate on the given DrawingView. > * @param checkDV DrawingView which is compared undo's DrawingView > */ > public void clearUndos(DrawingView checkDV) { > Iterator iter = undoStack.iterator(); > while (iter.hasNext()) { > Undoable currentUndo = (Undoable)iter.next(); > if (currentUndo.getDrawingView() == checkDV) { > iter.remove(); > } > } > } > > /** > * Removes all redo activities that operate on the given DrawingView. > * @param checkDV DrawingView which is compared redo's DrawingView > */ > public void clearRedos(DrawingView checkDV) { > Iterator iter = redoStack.iterator(); > while (iter.hasNext()) { > Undoable currentRedo = (Undoable)iter.next(); > if (currentRedo.getDrawingView() == checkDV) { > iter.remove(); > } > } > }