vocleditor.commands
Class CreateBoolExpCommand

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

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

Command for creating a boolean expression role.

Author:
bjoern

Constructor Summary
CreateBoolExpCommand(VOCLModel.BoolExp boolexp, VOCLModel.NavExp parent)
          The default constructor.
 
Method Summary
 void execute()
          Entry point for command execution.
 VOCLModel.BoolExp getBoolExp()
          Sets the bool expression.
 void redo()
          Redo command execution.
 void setCommandAttributes(VOCLModel.BoolOperation operation, boolean isHorizontal, int splitPercentage, boolean isNegated)
          Sets the command attributes.
 void setLocation(org.eclipse.draw2d.geometry.Point loc)
          Sets the location.
 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

CreateBoolExpCommand

public CreateBoolExpCommand(VOCLModel.BoolExp boolexp,
                            VOCLModel.NavExp parent)
The default constructor.

Method Detail

getBoolExp

public VOCLModel.BoolExp getBoolExp()
Sets the bool expression.

Returns:
the bool expression

setCommandAttributes

public void setCommandAttributes(VOCLModel.BoolOperation operation,
                                 boolean isHorizontal,
                                 int splitPercentage,
                                 boolean isNegated)
Sets the command attributes.

Parameters:
operation - the operation
isHorizontal - the horizontal flag
splitPercentage - the split percentage
isNegated - the flag shows the negation

execute

public void execute()
Entry point for command execution.

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

redo

public void redo()
Redo command execution.

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

undo

public void undo()
Undo command execution.

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

setLocation

public void setLocation(org.eclipse.draw2d.geometry.Point loc)
Sets the location.

Parameters:
loc - the location