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 void
execute()
Executes the deletion of selected grpah elementsString
getPresentationName()
Used to display the name for this edit.void
redo()
Deletes the GraphElements stored in this edit.void
undo()
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:
getPresentationName
in interfaceUndoableEdit
- Overrides:
getPresentationName
in classAbstractUndoableEdit
- Returns:
- the name of this edit.
- See Also:
UndoableEdit
-
execute
public void execute()Executes the deletion of selected grpah elements- Specified by:
execute
in classGraffitiAbstractUndoableEdit
-
redo
public void redo()Deletes the GraphElements stored in this edit.- Specified by:
redo
in interfaceUndoableEdit
- Overrides:
redo
in classAbstractUndoableEdit
-
undo
public void undo()Adds the deleted GraphElements stored in this edit.- Specified by:
undo
in interfaceUndoableEdit
- Overrides:
undo
in classAbstractUndoableEdit
-