org.graffiti.undo
Class ChangeAttributesEdit

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

public class ChangeAttributesEdit
extends GraffitiAbstractUndoableEdit

ChangeAttributesEdit

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

Field Summary
 
Fields inherited from class org.graffiti.undo.GraffitiAbstractUndoableEdit
coreBundle, geMap
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
ChangeAttributesEdit(Attribute attribute, Map<GraphElement,GraphElement> geMap)
          Creates a new AttributeChangeEdit object.
ChangeAttributesEdit(Map<Attribute,Object> attributeToOldValueMap, Map<GraphElement,GraphElement> geMap)
          Creates a new AttributeChangeEdit object.
 
Method Summary
 void execute()
          Executes action for corresponding tools.
 String getPresentationName()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class org.graffiti.undo.GraffitiAbstractUndoableEdit
getCurrentGraphElement
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChangeAttributesEdit

public ChangeAttributesEdit(Map<Attribute,Object> attributeToOldValueMap,
                            Map<GraphElement,GraphElement> geMap)
Creates a new AttributeChangeEdit object.

Parameters:
attributeToOldValueMap - map between an attribute and its old value.
geMap - map between the old graph elements and the new ones.

ChangeAttributesEdit

public ChangeAttributesEdit(Attribute attribute,
                            Map<GraphElement,GraphElement> geMap)
Creates a new AttributeChangeEdit object. It is usefull if only one attribute such as coordinate of a bend has been changed.

Parameters:
attribute - the changed attribute.
geMap - map between the old graph elements and the new ones.
Method Detail

getPresentationName

public String getPresentationName()
Specified by:
getPresentationName in interface UndoableEdit
Overrides:
getPresentationName in class AbstractUndoableEdit
See Also:
UndoableEdit.getPresentationName()

execute

public void execute()
Description copied from class: GraffitiAbstractUndoableEdit
Executes action for corresponding tools.

Specified by:
execute in class GraffitiAbstractUndoableEdit

redo

public void redo()
Specified by:
redo in interface UndoableEdit
Overrides:
redo in class AbstractUndoableEdit
See Also:
UndoableEdit.redo()

undo

public void undo()
Specified by:
undo in interface UndoableEdit
Overrides:
undo in class AbstractUndoableEdit
See Also:
UndoableEdit.undo()


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