Package org.csstudio.opibuilder.commands
Class CloneCommand
java.lang.Object
org.eclipse.gef.commands.Command
org.csstudio.opibuilder.commands.CloneCommand
public final class CloneCommand
extends org.eclipse.gef.commands.Command
A Command to clone the selected widgets.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPart
(AbstractWidgetModel model, org.eclipse.draw2d.geometry.Rectangle newBounds) Adds the givenAbstractWidgetModel
with the givenRectangle
to this Command.void
execute()
void
redo()
void
setGuide
(GuideModel guide, int alignment, boolean isHorizontal) Sets the givenGuideModel
for the given orientation.void
undo()
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canRedo, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
-
Constructor Details
-
CloneCommand
Constructor.- Parameters:
parent
- The parentDisplayModel
for the widgets
-
-
Method Details
-
addPart
Adds the givenAbstractWidgetModel
with the givenRectangle
to this Command.- Parameters:
model
- The AbstractWidgetModelnewBounds
- The new bounds for the AbstractWidgetModel
-
setGuide
Sets the givenGuideModel
for the given orientation.- Parameters:
guide
- The guidealignment
- The alignment for the guideisHorizontal
- The orientation of the guide
-
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
-