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
ConstructorDescriptionChangeGuideCommand
(AbstractWidgetModel model, boolean horizontalGuide) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
changeGuide
(GuideModel newGuide, int newAlignment) Changes the guide.void
execute()
void
redo()
void
setNewGuide
(GuideModel guide, int alignment) Sets the new guide.void
undo()
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:
execute
in classorg.eclipse.gef.commands.Command
-
redo
public void redo()- Overrides:
redo
in classorg.eclipse.gef.commands.Command
-
setNewGuide
Sets the new guide.- Parameters:
guide
- The new guidealignment
- The new alignment
-
undo
public void undo()- Overrides:
undo
in classorg.eclipse.gef.commands.Command
-