org.graffiti.undo
Class GraffitiAbstractUndoableEdit

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by org.graffiti.undo.GraffitiAbstractUndoableEdit
All Implemented Interfaces:
Serializable, UndoableEdit
Direct Known Subclasses:
AttributeEdit, ChangeAttributesEdit, EdgeDirectedEdit, EdgeReverseEdit, EdgeSourceNodeEdit, EdgeTargetNodeEdit, GraphElementsEdit

public abstract class GraffitiAbstractUndoableEdit
extends AbstractUndoableEdit

GraffitiAbstractUndoableEdit

Version:
$Revision: 5767 $
See Also:
Serialized Form

Field Summary
protected static Bundle coreBundle
          The Bundle of the main frame.
protected  Map<GraphElement,GraphElement> geMap
          The reference for the map between graph elements recreated after undo processing and original graph elements.
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
GraffitiAbstractUndoableEdit(Map<GraphElement,GraphElement> geMap)
          Creates a new GraffitiAbstractUndoableEdit object.
 
Method Summary
abstract  void execute()
          Executes action for corresponding tools.
protected  GraphElement getCurrentGraphElement(GraphElement ge)
          Returns a new graph element reference through the mapping from old ones.
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

geMap

protected Map<GraphElement,GraphElement> geMap
The reference for the map between graph elements recreated after undo processing and original graph elements.


coreBundle

protected static final Bundle coreBundle
The Bundle of the main frame.

Constructor Detail

GraffitiAbstractUndoableEdit

public GraffitiAbstractUndoableEdit(Map<GraphElement,GraphElement> geMap)
Creates a new GraffitiAbstractUndoableEdit object.

Parameters:
geMap - reference to the map supports the undo operations.
Method Detail

execute

public abstract void execute()
Executes action for corresponding tools.


getCurrentGraphElement

protected GraphElement getCurrentGraphElement(GraphElement ge)
Returns a new graph element reference through the mapping from old ones.

Parameters:
ge - a graph element has to be updated.
Returns:
a new existing graph element mapped from the given ones.


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