vocleditor.commands
Class CreateIfExpCommand

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

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

Command for creating a boolean expression role.

Author:
bjoern

Constructor Summary
CreateIfExpCommand(VOCLModel.IfExp ifexp, VOCLModel.NavExp parent)
          Constructor.
 
Method Summary
 void execute()
          Entry point for command execution.
 VOCLModel.IfExp getIfExp()
          Returns the if expression.
 void redo()
          Redo command execution.
 void setCommandAttributes(boolean isHorizontal, int splitPercentage1, int splitPercentage2, 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

CreateIfExpCommand

public CreateIfExpCommand(VOCLModel.IfExp ifexp,
                          VOCLModel.NavExp parent)
Constructor.

Method Detail

getIfExp

public VOCLModel.IfExp getIfExp()
Returns the if expression.

Returns:
the if expression

setCommandAttributes

public void setCommandAttributes(boolean isHorizontal,
                                 int splitPercentage1,
                                 int splitPercentage2,
                                 boolean isNegated)
Sets the command attributes.

Parameters:
isHorizontal - the horizontal flag
splitPercentage1 - the split percentage 1
splitPercentage2 - the split percentage 2
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 to set