|
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.ReconnectGraphEdgeCommand
public abstract class ReconnectGraphEdgeCommand
Reconnects graphically a GraphEdge
| Constructor Summary | |
|---|---|
ReconnectGraphEdgeCommand(org.eclipse.gef.ConnectionEditPart connection)
Constructor. |
|
ReconnectGraphEdgeCommand(org.eclipse.gef.ConnectionEditPart connection,
boolean needModelUpdate)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
canExecute()
|
void |
execute()
|
GraphEdge |
getEdge()
Get the GraphEdge |
GraphElement |
getNewElement()
Get the target GraphNode |
GraphElement |
getOldElement()
Get the source GraphNode |
protected abstract GraphElement |
getOldGraphElement(org.eclipse.gef.ConnectionEditPart connection)
|
protected void |
initializeConnectors(org.eclipse.gef.ConnectionEditPart connection)
Initializes the connectors before reconnection. |
void |
redo()
|
protected abstract void |
redoModel()
Update the model after at the end of the redo() method. |
void |
setNewElement(GraphElement newElement)
Set the target node |
void |
undo()
|
protected abstract void |
undoModel()
Update the model at the end of the undo() method. |
protected abstract void |
updateConnectors(GraphConnector newConnector,
GraphConnector oldConnector,
GraphConnector attachedConnector)
Updates anchors and edges within these connectors. |
| 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 ReconnectGraphEdgeCommand(org.eclipse.gef.ConnectionEditPart connection)
domain - the EditDomain (used to init the name)newObj - the edge to createold - the source node
public ReconnectGraphEdgeCommand(org.eclipse.gef.ConnectionEditPart connection,
boolean needModelUpdate)
domain - the EditDomain (used to init the name)newObj - the edge to createoldElement - 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 boolean canExecute()
canExecute in class org.eclipse.gef.commands.CommandCommand.canExecute()public void execute()
execute in class org.eclipse.gef.commands.CommandCommand.execute()public void redo()
redo in class org.eclipse.gef.commands.CommandCommand.redo()public void undo()
undo in class org.eclipse.gef.commands.CommandCommand.undo()public GraphEdge getEdge()
public GraphElement getOldElement()
public GraphElement getNewElement()
public void setNewElement(GraphElement newElement)
newElement - the target nodeprotected void initializeConnectors(org.eclipse.gef.ConnectionEditPart connection)
connection - protected abstract void redoModel()
protected abstract void undoModel()
protected abstract GraphElement getOldGraphElement(org.eclipse.gef.ConnectionEditPart connection)
protected abstract void updateConnectors(GraphConnector newConnector,
GraphConnector oldConnector,
GraphConnector attachedConnector)
newConnector - The connectors of the new elementoldConnector - The connectors of the old element
|
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.