|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
org.jupe.editors.classdiagram.model.commands.ConnectionCreateCommand
public class ConnectionCreateCommand
A command to create a connection between two NodeModelElement. The command can be undone or redone.
This command is designed to be used together with a GraphicalNodeEditPolicy. To use this command properly, following steps are necessary:
Constructor Summary | |
---|---|
ConnectionCreateCommand(NodeModelElement sourceElement,
java.lang.String typeName)
Instantiate a command that can create a connection between two NodeModelElements. |
Method Summary | |
---|---|
boolean |
canExecute()
|
void |
execute()
|
ConnectionElement |
getConnection()
|
void |
redo()
(non-Javadoc) |
void |
setTarget(NodeModelElement targetElement)
Set the target endpoint for the connection. |
void |
undo()
(non-Javadoc) |
Methods inherited from class org.eclipse.gef.commands.Command |
---|
canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionCreateCommand(NodeModelElement sourceElement, java.lang.String typeName)
sourceElement
- the source endpointtypeName
- The type of the connection. See IConstants
.
java.lang.IllegalArgumentException
- if source is nullMethod Detail |
---|
public ConnectionElement getConnection()
public boolean canExecute()
canExecute
in class org.eclipse.gef.commands.Command
public void execute()
execute
in class org.eclipse.gef.commands.Command
public void redo()
redo
in class org.eclipse.gef.commands.Command
Command.redo()
public void setTarget(NodeModelElement targetElement)
targetElement
- that target endpoint (a non-null Shape instance)
java.lang.IllegalArgumentException
- if target is nullpublic void undo()
undo
in class org.eclipse.gef.commands.Command
Command.undo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |