org.graffiti.undo
Class GraphElementsDeletionEdit

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by org.graffiti.undo.GraffitiAbstractUndoableEdit
          extended by org.graffiti.undo.GraphElementsEdit
              extended by org.graffiti.undo.GraphElementsDeletionEdit
All Implemented Interfaces:
Serializable, UndoableEdit

public class GraphElementsDeletionEdit
extends GraphElementsEdit

GraphElementsDeletionEdit makes deletion of graph elements undoable.

Version:
$Revision: 5779 $
Author:
$Author $
See Also:
Serialized Form

Nested Class Summary
static class GraphElementsDeletionEdit.Builder
          A builder for the GraphElementsDeletionEdit class.
 
Constructor Summary
GraphElementsDeletionEdit(Collection<GraphElement> graphElements, Graph graph, Map<GraphElement,GraphElement> geMap)
           
 
Method Summary
 void execute()
          Executes the deletion of selected graph elements
 String 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphElementsDeletionEdit

public GraphElementsDeletionEdit(Collection<GraphElement> graphElements,
                                 Graph graph,
                                 Map<GraphElement,GraphElement> geMap)
See Also:
GraffitiAbstractUndoableEdit.GraffitiAbstractUndoableEdit(Map)
Method Detail

getPresentationName

public String getPresentationName()
Used to display the name for this edit.

Specified by:
getPresentationName in interface UndoableEdit
Overrides:
getPresentationName in class AbstractUndoableEdit
Returns:
the name of this edit.
See Also:
UndoableEdit

execute

public void execute()
Executes the deletion of selected graph elements

Specified by:
execute in class GraffitiAbstractUndoableEdit

redo

public void redo()
Deletes the GraphElements stored in this edit.

Specified by:
redo in interface UndoableEdit
Overrides:
redo in class AbstractUndoableEdit

undo

public void undo()
Adds the deleted GraphElements stored in this edit.

Specified by:
undo in interface UndoableEdit
Overrides:
undo in class AbstractUndoableEdit


Generated at 2012-05-30 11:00:14 PM CEST