SAM

org.topcased.modeler.sam.commands
Class AddNewPortCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by org.topcased.modeler.sam.commands.AddNewPortCommand

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

Creation : 09 may 2005


Constructor Summary
AddNewPortCommand(GraphNode element, Modeler editor)
          Constructor
 
Method Summary
 boolean canExecute()
           
 void execute()
           
 void redo()
          Add a new DataPort object to the SynchronisationGate model object
 void undo()
          Remove the last added DataPort
 
Methods inherited from class org.eclipse.gef.commands.Command
canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddNewPortCommand

public AddNewPortCommand(GraphNode element,
                         Modeler editor)
Constructor

Parameters:
element - the GraphNode that will contain the newly created Port
Method Detail

canExecute

public boolean canExecute()
Overrides:
canExecute in class org.eclipse.gef.commands.Command
See Also:
Command.canExecute()

execute

public void execute()
Overrides:
execute in class org.eclipse.gef.commands.Command
See Also:
Command.execute()

redo

public void redo()
Add a new DataPort object to the SynchronisationGate model object

Overrides:
redo in class org.eclipse.gef.commands.Command
See Also:
Command.redo()

undo

public void undo()
Remove the last added DataPort

Overrides:
undo in class org.eclipse.gef.commands.Command
See Also:
Command.undo()

SAM

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.