Package org.graffiti.undo
Class GraphElementsDeletionEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
org.graffiti.undo.GraffitiAbstractUndoableEdit
org.graffiti.undo.GraphElementsEdit
org.graffiti.undo.GraphElementsDeletionEdit
- All Implemented Interfaces:
Serializable,UndoableEdit
public class GraphElementsDeletionEdit extends GraphElementsEdit
GraphElementsDeletionEdit makes deletion of graph elements
undoable.- Version:
- $Revision: 1.9 $
- Author:
- $Author $
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description GraphElementsDeletionEdit(Collection<GraphElement> graphElemList, Graph graph, Map<GraphElement,GraphElement> geMap) -
Method Summary
Modifier and Type Method Description voidexecute()Executes the deletion of selected grpah elementsStringgetPresentationName()Used to display the name for this edit.voidredo()Deletes the GraphElements stored in this edit.voidundo()Adds the deleted GraphElements stored in this edit.Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
-
Constructor Details
-
GraphElementsDeletionEdit
public GraphElementsDeletionEdit(Collection<GraphElement> graphElemList, Graph graph, Map<GraphElement,GraphElement> geMap)- See Also:
GraffitiAbstractUndoableEdit(Map)
-
-
Method Details
-
getPresentationName
Used to display the name for this edit.- Specified by:
getPresentationNamein interfaceUndoableEdit- Overrides:
getPresentationNamein classAbstractUndoableEdit- Returns:
- the name of this edit.
- See Also:
UndoableEdit
-
execute
public void execute()Executes the deletion of selected grpah elements- Specified by:
executein classGraffitiAbstractUndoableEdit
-
redo
public void redo()Deletes the GraphElements stored in this edit.- Specified by:
redoin interfaceUndoableEdit- Overrides:
redoin classAbstractUndoableEdit
-
undo
public void undo()Adds the deleted GraphElements stored in this edit.- Specified by:
undoin interfaceUndoableEdit- Overrides:
undoin classAbstractUndoableEdit
-