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 Details

    • ConnectionCreateCommand

      public ConnectionCreateCommand(AbstractWidgetModel source, String sourceTerminal)
      Instantiate a command that can create a connection between two widgets.
      Parameters:
      source - the source endpoint
      sourceTerminal - terminal on the source
      Throws:
      IllegalArgumentException - if source is null
  • Method Details

    • canExecute

      public boolean canExecute()
      Overrides:
      canExecute in class org.eclipse.gef.commands.Command
    • execute

      public void execute()
      Overrides:
      execute in class org.eclipse.gef.commands.Command
    • redo

      public void redo()
      Overrides:
      redo in class org.eclipse.gef.commands.Command
    • setTarget

      public void setTarget(AbstractWidgetModel target)
      Set the target for the connection.
      Parameters:
      target - that target
      Throws:
      IllegalArgumentException - if target is null
    • setTargetTerminal

      public void setTargetTerminal(String targetTerminal)
    • undo

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