kaapo.projectmanager.command
Class AddToSelectionEdit
java.lang.Object
kaapo.projectmanager.command.AbstractEdit
kaapo.projectmanager.command.AddToSelectionEdit
- All Implemented Interfaces:
- Edit
public class AddToSelectionEdit
- extends AbstractEdit
This Edit
adds a new DiagramComponentWrapper
to a pre-existing Selection
. If there are no
DiagramComponentWrappers
on the Point2D.Double
provided
in the constructor then nothing is done to the Selection
.
If the DiagramComponentWrapper
found is not already in the Selection
it is added to it. On the other hand if it is already in the Selection
it is
then removed from that Selection
.
- Author:
- hprajani
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddToSelectionEdit
public AddToSelectionEdit(Point2D clicked)
- Parameters:
clicked
- look for DiagramComponentWrappers in this coordinate
AddToSelectionEdit
public AddToSelectionEdit(DiagramComponentWrapper dcw)
- Parameters:
dcw
- goes into the Selection
execute
public void execute(ProjectManager pm)
throws EditFailedException
- Executes the edit.
- Parameters:
pm
- the ProjectManager the Edit is executed in
- Throws:
EditFailedException
- when given parameters are null- See Also:
Edit.execute(ProjectManager)