Modelers

org.topcased.modeler.commands
Class AddPortToMultiPortCommand

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

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

Creation : 09 may 2005


Constructor Summary
AddPortToMultiPortCommand(GraphNode parent, GraphNode child)
          Constructor
 
Method Summary
 boolean canExecute()
           
 void execute()
           
 void redo()
          Add a new DataPort object to the SynchronisationGate model object
protected  void redoModel()
          Update the DI model
 void undo()
          Remove the last added DataPort
protected  void undoModel()
          Undo the DI model modifications
 
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

AddPortToMultiPortCommand

public AddPortToMultiPortCommand(GraphNode parent,
                                 GraphNode child)
Constructor

Parameters:
parent - the parentEditPart that will contain the PortEditPart
child - the PortEditPart that is moved
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()

redoModel

protected void redoModel()
Update the DI model


undo

public void undo()
Remove the last added DataPort

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

undoModel

protected void undoModel()
Undo the DI model modifications


Modelers

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