Package org.csstudio.opibuilder.commands
Class ChangeGuideCommand
java.lang.Object
org.eclipse.gef.commands.Command
org.csstudio.opibuilder.commands.ChangeGuideCommand
public final class ChangeGuideCommand
extends org.eclipse.gef.commands.Command
A command to change a Guide.
-
Constructor Summary
ConstructorsConstructorDescriptionChangeGuideCommand(AbstractWidgetModel model, boolean horizontalGuide) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchangeGuide(GuideModel newGuide, int newAlignment) Changes the guide.voidexecute()voidredo()voidsetNewGuide(GuideModel guide, int alignment) Sets the new guide.voidundo()Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canRedo, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
-
Constructor Details
-
ChangeGuideCommand
Constructor.- Parameters:
model- The AbstractWidgetModelhorizontalGuide- The horizontal guide
-
-
Method Details
-
changeGuide
Changes the guide.- Parameters:
newGuide- The new guidenewAlignment- The new alignment
-
execute
public void execute()- Overrides:
executein classorg.eclipse.gef.commands.Command
-
redo
public void redo()- Overrides:
redoin classorg.eclipse.gef.commands.Command
-
setNewGuide
Sets the new guide.- Parameters:
guide- The new guidealignment- The new alignment
-
undo
public void undo()- Overrides:
undoin classorg.eclipse.gef.commands.Command
-