Modelers

org.topcased.modeler.commands
Class AddGraphNodeCommand

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

Deprecated. Use the CreateGraphNodeCommand instead

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

Node creation
This command just add a graphNode into another. It also add the contained element to the element of the parentNode graph node if needed.
creation : 30 nov. 2004


Constructor Summary
AddGraphNodeCommand(GraphNode newParent, GraphNode child, java.lang.Object constraint)
          Deprecated. Constructor
 
Method Summary
 boolean canExecute()
          Deprecated. Check if the object that we try to add to the model is not already set (because the cardinality is 1)
 void execute()
          Deprecated.  
protected  EObject getChildEObject()
          Deprecated. Return the childNode EObject to create
protected  GraphNode getChildNode()
          Deprecated. Return the childNode to create
protected  EObject getNewParentEObject()
          Deprecated. Return the parentNode EObject that will contain the childNode soon
protected  EObject getOldParentEObject()
          Deprecated. Return the parentNode EObject that originally contained the childNode
 void redo()
          Deprecated.  
protected  void redoModel()
          Deprecated. Update the model after at the end of the redo() method.
 void undo()
          Deprecated.  
protected  void undoModel()
          Deprecated. Update the model at the end of the undo() method.
 
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

AddGraphNodeCommand

public AddGraphNodeCommand(GraphNode newParent,
                           GraphNode child,
                           java.lang.Object constraint)
Deprecated. 
Constructor

Parameters:
newParent - the parentNode node
child - the child Node that is moved
constraint - the new constraint
Method Detail

canExecute

public boolean canExecute()
Deprecated. 
Check if the object that we try to add to the model is not already set (because the cardinality is 1)

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

execute

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

redo

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

redoModel

protected void redoModel()
Deprecated. 
Update the model after at the end of the redo() method. This method should be overriden by subclasses.


undo

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

undoModel

protected void undoModel()
Deprecated. 
Update the model at the end of the undo() method. This method should be overriden by subclasses.


getChildNode

protected GraphNode getChildNode()
Deprecated. 
Return the childNode to create

Returns:
the childNode

getChildEObject

protected EObject getChildEObject()
Deprecated. 
Return the childNode EObject to create

Returns:
the childNode EObject

getOldParentEObject

protected EObject getOldParentEObject()
Deprecated. 
Return the parentNode EObject that originally contained the childNode

Returns:
the old parent EObject

getNewParentEObject

protected EObject getNewParentEObject()
Deprecated. 
Return the parentNode EObject that will contain the childNode soon

Returns:
the new parent EObject

Modelers

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