Package org.graffiti.undo
Class AddEdgeEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
org.graffiti.undo.GraffitiAbstractUndoableEdit
org.graffiti.undo.GraphElementsEdit
org.graffiti.undo.AddEdgeEdit
- All Implemented Interfaces:
 Serializable,UndoableEdit
public class AddEdgeEdit extends GraphElementsEdit
Class 
AddNodeEdit makes the add edge action undoable.- Version:
 - $Revision: 1.5 $
 - Author:
 - Walter Wirch
 - See Also:
 - Serialized Form
 
- 
Constructor Summary
Constructors Constructor Description AddEdgeEdit(Edge edge, Graph graph, Map<GraphElement,GraphElement> geMap)Constructor for AddEdgeEdit. - 
Method Summary
Modifier and Type Method Description voidexecute()Executes action for corresponding tools.StringgetPresentationName()Used to display the name for this edit.voidredo()Adds the same edge that was added through the method that created this edit.voidundo()Deletes the edge whose addition is stored in this edit.Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString 
- 
Constructor Details
- 
AddEdgeEdit
Constructor for AddEdgeEdit.- Parameters:
 edge-graph-geMap-
 
 - 
 - 
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()Description copied from class:GraffitiAbstractUndoableEditExecutes action for corresponding tools.- Specified by:
 executein classGraffitiAbstractUndoableEdit
 - 
redo
public void redo()Adds the same edge that was added through the method that created this edit.- Specified by:
 redoin interfaceUndoableEdit- Overrides:
 redoin classAbstractUndoableEdit
 - 
undo
public void undo()Deletes the edge whose addition is stored in this edit.- Specified by:
 undoin interfaceUndoableEdit- Overrides:
 undoin classAbstractUndoableEdit
 
 -