vocleditor.commands
Class CreateConstraintCommand

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

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

Command for creating a asscociation role.

Author:
bjoern

Constructor Summary
CreateConstraintCommand()
          The default constructor.
 
Method Summary
 void execute()
          Entry point for command execution.
 VOCLModel.VOCLDiagram getParent()
          Returns the parent vocl diagramm.
 void redo()
          Redo command execution.
 void setConstraint(VOCLModel.Constraint constraint)
          Sets the constraint.
 void setLocation(org.eclipse.draw2d.geometry.Point loc)
          Sets the location.
 void setParent(VOCLModel.VOCLDiagram newParent)
          Sets the parent vocl diagramm.
 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

CreateConstraintCommand

public CreateConstraintCommand()
The default constructor.

Method Detail

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

getParent

public VOCLModel.VOCLDiagram getParent()
Returns the parent vocl diagramm.

Returns:
the parent vocl diagramm

setParent

public void setParent(VOCLModel.VOCLDiagram newParent)
Sets the parent vocl diagramm.

Parameters:
newParent - the parent vocl diagramm to set

setConstraint

public void setConstraint(VOCLModel.Constraint constraint)
Sets the constraint.

Parameters:
constraint - the constraint to set

setLocation

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

Parameters:
loc - the location to set