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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPart(AbstractWidgetModel model, org.eclipse.draw2d.geometry.Rectangle newBounds) Adds the givenAbstractWidgetModelwith the givenRectangleto this Command.voidexecute()voidredo()voidsetGuide(GuideModel guide, int alignment, boolean isHorizontal) Sets the givenGuideModelfor the given orientation.voidundo()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 parentDisplayModelfor the widgets
-
-
Method Details
-
addPart
Adds the givenAbstractWidgetModelwith the givenRectangleto this Command.- Parameters:
model- The AbstractWidgetModelnewBounds- The new bounds for the AbstractWidgetModel
-
setGuide
Sets the givenGuideModelfor the given orientation.- Parameters:
guide- The guidealignment- The alignment for the guideisHorizontal- The orientation of the guide
-
execute
public void execute()- Overrides:
executein classorg.eclipse.gef.commands.Command
-
redo
public void redo()- Overrides:
redoin classorg.eclipse.gef.commands.Command
-
undo
public void undo()- Overrides:
undoin classorg.eclipse.gef.commands.Command
-