|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
org.topcased.modeler.commands.CreateGraphEdgeCommand
public class CreateGraphEdgeCommand
Creation command for association
This command just add a graphEdge into a graphNode. It also add the contained element to the element of the parent
graph node if needed.
creation : 30 nov. 2004
Constructor Summary | |
---|---|
CreateGraphEdgeCommand(org.eclipse.gef.EditDomain domain,
GraphEdge newObj,
GraphElement src,
boolean needModelUpdate)
Constructor. |
|
CreateGraphEdgeCommand(org.eclipse.gef.EditDomain domain,
GraphEdge newObj,
GraphElement src,
java.util.List featuresList,
boolean needModelUpdate)
Constructor |
Method Summary | |
---|---|
boolean |
canExecute()
|
void |
execute()
|
GraphElement |
getContainer()
Get the container GraphElement |
GraphEdge |
getEdge()
Get the GraphEdge |
org.eclipse.gef.EditDomain |
getEditDomain()
Get the EditDomain |
GraphElement |
getSource()
Get the source GraphNode |
GraphElement |
getTarget()
Get the target GraphNode |
protected void |
initName()
Give a unique name to the model object inside the current diagram |
protected void |
initName(EObject cont)
Give a unique name to the model object inside the current diagram |
protected boolean |
isUpdateModel()
Return a boolean value used to update or not the model |
void |
redo()
|
protected void |
redoModel()
Update the model after at the end of the redo() method. |
void |
setTarget(GraphElement target)
Set the target node |
void |
undo()
|
protected void |
undoModel()
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 |
---|
public CreateGraphEdgeCommand(org.eclipse.gef.EditDomain domain, GraphEdge newObj, GraphElement src, boolean needModelUpdate)
domain
- the EditDomain (used to init the name)newObj
- the edge to createsrc
- the source nodeneedModelUpdate
- true
if the model must be modified during this command, false
if objects already exist in the mode.public CreateGraphEdgeCommand(org.eclipse.gef.EditDomain domain, GraphEdge newObj, GraphElement src, java.util.List featuresList, boolean needModelUpdate)
domain
- the EditDomain (used to init the name)newObj
- the edge to createsrc
- the source nodefeaturesList
- to be defineneedModelUpdate
- true
if the model must be modified during this command, false
if objects already exist in the mode.Method Detail |
---|
public void setTarget(GraphElement target)
target
- the target nodepublic boolean canExecute()
canExecute
in class org.eclipse.gef.commands.Command
Command.canExecute()
public void execute()
execute
in class org.eclipse.gef.commands.Command
Command.execute()
public void redo()
redo
in class org.eclipse.gef.commands.Command
Command.redo()
protected void redoModel()
protected void initName()
protected void initName(EObject cont)
cont
- The container model object of the connectionpublic void undo()
undo
in class org.eclipse.gef.commands.Command
Command.undo()
protected void undoModel()
protected boolean isUpdateModel()
public GraphEdge getEdge()
public GraphElement getSource()
public GraphElement getTarget()
public GraphElement getContainer()
public org.eclipse.gef.EditDomain getEditDomain()
|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.