Package org.csstudio.opibuilder.commands
Class ConnectionCreateCommand
java.lang.Object
org.eclipse.gef.commands.Command
org.csstudio.opibuilder.commands.ConnectionCreateCommand
public class ConnectionCreateCommand
extends org.eclipse.gef.commands.Command
A command to create a connection between two widgets.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionCreateCommand(AbstractWidgetModel source, String sourceTerminal) Instantiate a command that can create a connection between two widgets. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidexecute()voidredo()voidsetTarget(AbstractWidgetModel target) Set the target for the connection.voidsetTargetTerminal(String targetTerminal) voidundo()Methods inherited from class org.eclipse.gef.commands.Command
canRedo, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
-
Constructor Details
-
ConnectionCreateCommand
Instantiate a command that can create a connection between two widgets.- Parameters:
source- the source endpointsourceTerminal- terminal on the source- Throws:
IllegalArgumentException- if source is null
-
-
Method Details
-
canExecute
public boolean canExecute()- Overrides:
canExecutein classorg.eclipse.gef.commands.Command
-
execute
public void execute()- Overrides:
executein classorg.eclipse.gef.commands.Command
-
redo
public void redo()- Overrides:
redoin classorg.eclipse.gef.commands.Command
-
setTarget
Set the target for the connection.- Parameters:
target- that target- Throws:
IllegalArgumentException- if target is null
-
setTargetTerminal
-
undo
public void undo()- Overrides:
undoin classorg.eclipse.gef.commands.Command
-