kaapo.projectmanager.command
Class RemoveDComponentEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
kaapo.projectmanager.command.AbstractUndoableEdit
kaapo.projectmanager.command.RemoveDComponentEdit
- All Implemented Interfaces:
- Serializable, UndoableEdit
public class RemoveDComponentEdit
- extends AbstractUndoableEdit
This class is an UndoableEdit
that removes a
DiagramComponentWrapper
and possibly the
DiagramComponent
related to it from a
Project
.
- Author:
- hprajani
- See Also:
- Serialized Form
Method Summary |
boolean |
canRedo()
|
boolean |
canUndo()
|
void |
execute(ProjectManager pm)
Removes all the currently selected DiagramComponentWrappers
from a Diagram and possibly the related DiagramComponent
from the Project . |
void |
redo()
Redos the removal of selected DiagramComponents. |
void |
undo()
Undos the removal of DiagramComponents. |
RemoveDComponentEdit
public RemoveDComponentEdit()
- constructs an Edit that removes all the DiagramComponentWrappers
selected in a
ProjectManager
.
undo
public void undo()
- Undos the removal of DiagramComponents.
- Specified by:
undo
in interface UndoableEdit
- Overrides:
undo
in class AbstractUndoableEdit
- See Also:
UndoableEdit.undo()
redo
public void redo()
- Redos the removal of selected DiagramComponents.
- Specified by:
redo
in interface UndoableEdit
- Overrides:
redo
in class AbstractUndoableEdit
- See Also:
UndoableEdit.redo()
execute
public void execute(ProjectManager pm)
- Removes all the currently selected
DiagramComponentWrappers
from a Diagram
and possibly the related DiagramComponent
from the Project
.
- Specified by:
execute
in class AbstractUndoableEdit
- Parameters:
pm
- the enviroment where the Edit is executed in.- See Also:
AbstractUndoableEdit.execute(kaapo.projectmanager.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()