edu.usc.cse.desi.command
Class CreateCommand

java.lang.Object
  extended byorg.eclipse.gef.commands.Command
      extended byedu.usc.cse.desi.command.CreateCommand

public class CreateCommand
extends org.eclipse.gef.commands.Command

Author:
Nels Started Mar 7, 2004 This is a command to create a new Host or Component inside our model. It could be create inside a DESIViewModel, HostViewModel or ComponentViewModel.

Field Summary
private  AbstractViewModel myChild
           
private  org.eclipse.draw2d.geometry.Point myLocation
           
private  AbstractViewModel myParent
           
private  DESIViewModel myTopLevelModel
           
 
Fields inherited from class org.eclipse.gef.commands.Command
 
Constructor Summary
CreateCommand()
           
CreateCommand(java.lang.String type)
           
 
Method Summary
 void execute()
          This method actually executes the command in question, setting all the new values in the model.
 AbstractDESIModel getMyChild()
           
 org.eclipse.draw2d.geometry.Point getMyLocation()
           
 AbstractDESIModel getMyParent()
           
 DESIViewModel getMyTopLevelModel()
           
 void setChild(AbstractViewModel model)
           
 void setLocation(org.eclipse.draw2d.geometry.Point point)
           
 void setMyTopLevelModel(DESIViewModel myTopLevelModel)
           
 void setParent(AbstractViewModel model)
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myParent

private AbstractViewModel myParent

myChild

private AbstractViewModel myChild

myTopLevelModel

private DESIViewModel myTopLevelModel

myLocation

private org.eclipse.draw2d.geometry.Point myLocation
Constructor Detail

CreateCommand

public CreateCommand()

CreateCommand

public CreateCommand(java.lang.String type)
Method Detail

getMyTopLevelModel

public DESIViewModel getMyTopLevelModel()
Returns:
Returns the myTopLevelModel.

setMyTopLevelModel

public void setMyTopLevelModel(DESIViewModel myTopLevelModel)
Parameters:
myTopLevelModel - The myTopLevelModel to set.

execute

public void execute()
This method actually executes the command in question, setting all the new values in the model.


setChild

public void setChild(AbstractViewModel model)
Parameters:
model -

setLocation

public void setLocation(org.eclipse.draw2d.geometry.Point point)
Parameters:
point -

setParent

public void setParent(AbstractViewModel model)
Parameters:
model -

getMyChild

public AbstractDESIModel getMyChild()
Returns:

getMyLocation

public org.eclipse.draw2d.geometry.Point getMyLocation()
Returns:

getMyParent

public AbstractDESIModel getMyParent()
Returns: