Package org.graffiti.undo
Class ChangeAttributesEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
org.graffiti.undo.GraffitiAbstractUndoableEdit
org.graffiti.undo.ChangeAttributesEdit
- All Implemented Interfaces:
Serializable,UndoableEdit
public class ChangeAttributesEdit extends GraffitiAbstractUndoableEdit
ChangeAttributesEdit
- Version:
- $Revision: 1.8 $
- Author:
- wirch
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description ChangeAttributesEdit(Graph graph, Map attributeToOldValueMap, Map geMap)Creates a newAttributeChangeEditobject.ChangeAttributesEdit(Graph graph, Attribute attribute, Map geMap)Creates a newAttributeChangeEditobject. -
Method Summary
Modifier and Type Method Description voidexecute()Executes action for corresponding tools.StringgetPresentationName()voidredo()voidundo()Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
-
Constructor Details
-
ChangeAttributesEdit
Creates a newAttributeChangeEditobject.- Parameters:
attributeToOldValueMap- map between an attribute and its old value.geMap- map between the old graph elements and the new ones.
-
ChangeAttributesEdit
Creates a newAttributeChangeEditobject. 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 Details
-
getPresentationName
- Specified by:
getPresentationNamein interfaceUndoableEdit- Overrides:
getPresentationNamein classAbstractUndoableEdit- See Also:
UndoableEdit.getPresentationName()
-
execute
public void execute()Description copied from class:GraffitiAbstractUndoableEditExecutes action for corresponding tools.- Specified by:
executein classGraffitiAbstractUndoableEdit
-
redo
public void redo()- Specified by:
redoin interfaceUndoableEdit- Overrides:
redoin classAbstractUndoableEdit- See Also:
UndoableEdit.redo()
-
undo
public void undo()- Specified by:
undoin interfaceUndoableEdit- Overrides:
undoin classAbstractUndoableEdit- See Also:
UndoableEdit.undo()
-