kaapo.projectmanager.command
Class MoveDComponentEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
kaapo.projectmanager.command.AbstractUndoableEdit
kaapo.projectmanager.command.MoveDComponentEdit
- All Implemented Interfaces:
- Serializable, UndoableEdit
public class MoveDComponentEdit
- extends AbstractUndoableEdit
This UndoableEdit is designed to move a
DiagramComponentWrapper around. The point that defines
the place of a DiagramCompoentWrapper is its left-top corner.
- Author:
- hprajani
- See Also:
- Serialized Form
|
Method Summary |
boolean |
canRedo()
|
boolean |
canUndo()
|
void |
execute(ProjectManager pm)
Executes the created Edit inside the given environment. |
void |
redo()
Redos the edit taken back. |
void |
undo()
Replaces an Element's new place with the old. |
MoveDComponentEdit
public MoveDComponentEdit(Point2D start,
Point2D end)
- constructs the Edit with two points
- Parameters:
start - the point where the moving startedend - the point where the moving ended
undo
public void undo()
- Replaces an Element's new place with the old.
- Specified by:
undo in interface UndoableEdit- Overrides:
undo in class AbstractUndoableEdit
- See Also:
UndoableEdit.undo()
redo
public void redo()
- Redos the edit taken back.
- Specified by:
redo in interface UndoableEdit- Overrides:
redo in class AbstractUndoableEdit
- See Also:
UndoableEdit.redo()
execute
public void execute(ProjectManager pm)
- Description copied from class:
AbstractUndoableEdit
- Executes the created Edit inside the given environment.
- Specified by:
execute in class AbstractUndoableEdit
- Parameters:
pm - the enviroment where the Edit is executed in.- See Also:
AbstractUndoableEdit.execute(ProjectManager)
canUndo
public boolean canUndo()
- Specified by:
canUndo in interface UndoableEdit- Overrides:
canUndo in class AbstractUndoableEdit
- See Also:
UndoableEdit.canUndo()
canRedo
public boolean canRedo()
- Specified by:
canRedo in interface UndoableEdit- Overrides:
canRedo in class AbstractUndoableEdit
- See Also:
UndoableEdit.canRedo()