Package org.csstudio.opibuilder.commands
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 Summary
ConstructorDescriptionWidgetCreateCommand
(AbstractWidgetModel newWidget, AbstractContainerModel container, org.eclipse.draw2d.geometry.Rectangle bounds, boolean append) WidgetCreateCommand
(AbstractWidgetModel newWidget, AbstractContainerModel container, org.eclipse.draw2d.geometry.Rectangle bounds, boolean append, boolean applySchema) -
Method Summary
Methods inherited from class org.eclipse.gef.commands.Command
canRedo, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
-
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 widgetappend
- 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 widgetappend
- true if its selection is appended to other selections.
-
-
Method Details
-
canExecute
public boolean canExecute()- Overrides:
canExecute
in classorg.eclipse.gef.commands.Command
-
execute
public void execute()- Overrides:
execute
in classorg.eclipse.gef.commands.Command
-
redo
public void redo()- Overrides:
redo
in classorg.eclipse.gef.commands.Command
-
undo
public void undo()- Overrides:
undo
in classorg.eclipse.gef.commands.Command
-
setIndex
public void setIndex(int index)
-