vocleditor.commands
Class EditIfExpCommand

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

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

Command class for edit the properties of a boolean expression.

Author:
bjoern

Constructor Summary
EditIfExpCommand(VOCLModel.IfExp ifexp)
          creates a new EditIfExpCommand
 
Method Summary
 void execute()
          execute this command
 void redo()
          Redo command execution.
 void setCommandAttributes(boolean isHorizontal, int splitPercentage1, int splitPercentage2, boolean isNegated)
          sets the new ifexp attributes to be set in this commmand
 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

EditIfExpCommand

public EditIfExpCommand(VOCLModel.IfExp ifexp)
creates a new EditIfExpCommand

Parameters:
ifexp - the ifexp to be altered
Method Detail

setCommandAttributes

public void setCommandAttributes(boolean isHorizontal,
                                 int splitPercentage1,
                                 int splitPercentage2,
                                 boolean isNegated)
sets the new ifexp attributes to be set in this commmand

Parameters:
isHorizontal - the new split horizontal flag
splitPercentage1 - Split percentage for upper and bottom part (or left/right if splitted vertically)
splitPercentage2 - Split percentage for left and right (or top/bottom if splitted vertically)
isNegated - indicating whether the Expression is negated

execute

public void execute()
execute this 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