vocleditor.commands
Class EditConditionCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by vocleditor.commands.EditConditionCommand

public class EditConditionCommand
extends org.eclipse.gef.commands.Command

Author:
manaljav Command class for edit the condition properties.

Constructor Summary
EditConditionCommand()
          The constructor.
 
Method Summary
 void execute()
          Executes the command.
 void redo()
          Redo command execution.
 void setCommandAttributes(java.lang.String op, java.lang.String value, VOCLModel.VariableDeclaration left, VOCLModel.VariableDeclaration right, boolean leftPre, boolean rightPre)
          Sets the command attributes.
 void setCondition(VOCLModel.Condition condition)
          Sets the condition.
 void setLeft(VOCLModel.VariableDeclaration left)
          Sets the left variable.
 void setLeftPre(boolean leftPre)
          Sets the left pre.
 void setOp(java.lang.String op)
          Sets the operation.
 void setRight(VOCLModel.VariableDeclaration right)
          Sets the right variable.
 void setRightPre(boolean rightPre)
          Sets the rigth pre.
 void setValue(java.lang.String value)
          Sets the value.
 void undo()
          Undo command execution.
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditConditionCommand

public EditConditionCommand()
The constructor.

Method Detail

setCondition

public void setCondition(VOCLModel.Condition condition)
Sets the condition.

Parameters:
condition - the condition

execute

public void execute()
Executes the command.

Overrides:
execute in class org.eclipse.gef.commands.Command

undo

public void undo()
Undo command execution.

Overrides:
undo in class org.eclipse.gef.commands.Command

redo

public void redo()
Redo command execution.

Overrides:
redo in class org.eclipse.gef.commands.Command

setOp

public void setOp(java.lang.String op)
Sets the operation.

Parameters:
op - the operation set

setValue

public void setValue(java.lang.String value)
Sets the value.

Parameters:
value - the value to set

setRight

public void setRight(VOCLModel.VariableDeclaration right)
Sets the right variable.

Parameters:
right - the right variable

setLeft

public void setLeft(VOCLModel.VariableDeclaration left)
Sets the left variable.

Parameters:
left - the left variable

setLeftPre

public void setLeftPre(boolean leftPre)
Sets the left pre.

Parameters:
leftPre - the left pre

setRightPre

public void setRightPre(boolean rightPre)
Sets the rigth pre.

Parameters:
rightPre - the right pre

setCommandAttributes

public void setCommandAttributes(java.lang.String op,
                                 java.lang.String value,
                                 VOCLModel.VariableDeclaration left,
                                 VOCLModel.VariableDeclaration right,
                                 boolean leftPre,
                                 boolean rightPre)
Sets the command attributes.

Parameters:
op - the operation.
value - the value
left - the left variable
right - the right variable