kaapo.projectmanager.command
Class AddToSelectionEdit

java.lang.Object
  extended by kaapo.projectmanager.command.AbstractEdit
      extended by 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

Constructor Summary
AddToSelectionEdit(DiagramComponentWrapper dcw)
           
AddToSelectionEdit(Point2D clicked)
           
 
Method Summary
 void execute(ProjectManager pm)
          Executes the edit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddToSelectionEdit

public AddToSelectionEdit(Point2D clicked)
Parameters:
clicked - look for DiagramComponentWrappers in this coordinate

AddToSelectionEdit

public AddToSelectionEdit(DiagramComponentWrapper dcw)
Parameters:
dcw - goes into the Selection
Method Detail

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)