Class WidgetCreateCommand

java.lang.Object
org.eclipse.gef.commands.Command
org.csstudio.opibuilder.commands.WidgetCreateCommand

public class WidgetCreateCommand extends org.eclipse.gef.commands.Command
The command to add a widget to a container.
  • Constructor Details

    • WidgetCreateCommand

      public WidgetCreateCommand(AbstractWidgetModel newWidget, AbstractContainerModel container, org.eclipse.draw2d.geometry.Rectangle bounds, boolean append, boolean applySchema)
      Parameters:
      newWidget - The new Widget to be added.
      container - the parent.
      bounds - the bounds for the new widget
      append - true if its selection is appended to other selections.
      applySchema - true if the new widget's properties are applied with schema.
    • WidgetCreateCommand

      public WidgetCreateCommand(AbstractWidgetModel newWidget, AbstractContainerModel container, org.eclipse.draw2d.geometry.Rectangle bounds, boolean append)
      Parameters:
      newWidget - The new Widget to be added.
      container - the parent.
      bounds - the bounds for the new widget
      append - true if its selection is appended to other selections.
  • 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
    • undo

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

      public void setIndex(int index)