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 newAttributeChangeEdit
object.ChangeAttributesEdit(Graph graph, Attribute attribute, Map geMap)
Creates a newAttributeChangeEdit
object. -
Method Summary
Modifier and Type Method Description void
execute()
Executes action for corresponding tools.String
getPresentationName()
void
redo()
void
undo()
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, die, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
-
Constructor Details
-
ChangeAttributesEdit
Creates a newAttributeChangeEdit
object.- Parameters:
attributeToOldValueMap
- map between an attribute and its old value.geMap
- map between the old graph elements and the new ones.
-
ChangeAttributesEdit
Creates a newAttributeChangeEdit
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 Details
-
getPresentationName
- Specified by:
getPresentationName
in interfaceUndoableEdit
- Overrides:
getPresentationName
in classAbstractUndoableEdit
- See Also:
UndoableEdit.getPresentationName()
-
execute
public void execute()Description copied from class:GraffitiAbstractUndoableEdit
Executes action for corresponding tools.- Specified by:
execute
in classGraffitiAbstractUndoableEdit
-
redo
public void redo()- Specified by:
redo
in interfaceUndoableEdit
- Overrides:
redo
in classAbstractUndoableEdit
- See Also:
UndoableEdit.redo()
-
undo
public void undo()- Specified by:
undo
in interfaceUndoableEdit
- Overrides:
undo
in classAbstractUndoableEdit
- See Also:
UndoableEdit.undo()
-