kaapo.projectmanager.command
Class ResizeElementEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
kaapo.projectmanager.command.AbstractUndoableEdit
kaapo.projectmanager.command.ResizeElementEdit
- All Implemented Interfaces:
- Serializable, UndoableEdit
public class ResizeElementEdit
- extends AbstractUndoableEdit
This is an UndoableEdit
that resizes an
DiagramComponent
.
TODO: Connections are not moving correctly. Two ways: calculate correct
coordinates on the fly and move connections (via Edits or straight) or
use relative coordinates with connection points and refresh them after
resizing.
- Author:
- hprajani
- See Also:
- Serialized Form
ResizeElementEdit
public ResizeElementEdit(Dimension newSize,
HotSpot.HotSpotType type)
- Parameters:
newSize
- the new size for selected DiagramComponent
undo
public void undo()
- Specified by:
undo
in interface UndoableEdit
- Overrides:
undo
in class AbstractUndoableEdit
- See Also:
UndoableEdit.undo()
redo
public void redo()
- Specified by:
redo
in interface UndoableEdit
- Overrides:
redo
in class AbstractUndoableEdit
- See Also:
UndoableEdit.redo()
execute
public void execute(ProjectManager pm)
- Resizes the element with parameters given in constructor.
- 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()