Package org.csstudio.opibuilder.commands
Class SetWidgetPropertyCommand
java.lang.Object
org.eclipse.gef.commands.Command
org.csstudio.opibuilder.commands.SetWidgetPropertyCommand
public class SetWidgetPropertyCommand
extends org.eclipse.gef.commands.Command
A Command to set a property value of a widget. Use command can help to realize redo/undo.
-
Constructor Summary
ConstructorDescriptionSetWidgetPropertyCommand
(AbstractWidgetModel widget, String prop_id, Object newValue) Constructor. -
Method Summary
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canRedo, canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel
-
Constructor Details
-
SetWidgetPropertyCommand
Constructor.- Parameters:
widget
- The widget, whose property value should be setprop_id
- The id of the propertynewValue
- The new value for the property
-
-
Method Details
-
execute
public void execute()- Overrides:
execute
in classorg.eclipse.gef.commands.Command
-
undo
public void undo()- Overrides:
undo
in classorg.eclipse.gef.commands.Command
-