info.bioinfweb.treegraph.document.undo.edit
Class DeleteEdit
java.lang.Object
info.bioinfweb.treegraph.document.undo.DocumentEdit
info.bioinfweb.treegraph.document.undo.edit.DeleteEdit
- All Implemented Interfaces:
- WarningEdit, UndoableEdit
- Direct Known Subclasses:
- CutEdit
public class DeleteEdit
- extends DocumentEdit
- implements WarningEdit
Removes all elements currently selected. RemoveSubtreeEdit,
RemoveLabelEdit and RemoveLegendEdit are used internally.
- Author:
- Ben Stöver
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
elements
private HashSet<ConcretePaintableElement> elements
edits
private Vector<DocumentEdit> edits
showWarnings
private boolean showWarnings
DeleteEdit
public DeleteEdit(Document document,
ConcretePaintableElement[] elements,
boolean showWarnings)
getShowWarnings
public boolean getShowWarnings()
- Specified by:
getShowWarnings in interface WarningEdit
setShowWarnings
public void setShowWarnings(boolean showWarnings)
- Specified by:
setShowWarnings in interface WarningEdit
containsParent
private boolean containsParent(Node node)
deleteSubtreeElements
private void deleteSubtreeElements()
createSubedits
private void createSubedits()
redo
public void redo()
throws CannotRedoException
- Specified by:
redo in interface UndoableEdit- Overrides:
redo in class DocumentEdit
- Throws:
CannotRedoException
undo
public void undo()
throws CannotUndoException
- Specified by:
undo in interface UndoableEdit- Overrides:
undo in class DocumentEdit
- Throws:
CannotUndoException
getPresentationName
public String getPresentationName()
- Specified by:
getPresentationName in interface UndoableEdit