vocleditor.commands
Class CreateClassifierRoleCommand

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

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

Command for creating a asscociation role.


Constructor Summary
CreateClassifierRoleCommand()
          The default constructor.
 
Method Summary
 void execute()
          Entry point for command execution.
 VOCLModel.ClassifierRole getClassifierRole()
          Returns the classifier role.
 VOCLModel.NavExp getParent()
          Returns the parent navigation expression.
 void redo()
          Redo command execution.
 void setAttributes(java.util.List attributes)
          Sets the list of attributes.
 void setClassifierRole(VOCLModel.ClassifierRole classifierrole)
          Sets the classifier role.
 void setCommandAttributes(java.lang.String name, java.lang.String type, java.util.List attributes)
          Sets the command attributes.
 void setLocation(org.eclipse.draw2d.geometry.Point loc)
          Sets the location.
 void setName(java.lang.String name)
          Sets the classifier role name.
 void setParent(VOCLModel.NavExp newParent)
          Sets the parent navigation expression.
 void setType(java.lang.String type)
          Sets the classifier role type
 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

CreateClassifierRoleCommand

public CreateClassifierRoleCommand()
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

setClassifierRole

public void setClassifierRole(VOCLModel.ClassifierRole classifierrole)
Sets the classifier role.

Parameters:
classifierrole - the classifier role to set

getClassifierRole

public VOCLModel.ClassifierRole getClassifierRole()
Returns the classifier role.

Returns:
the classifier role

setLocation

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

Parameters:
loc - the location to set

getParent

public VOCLModel.NavExp getParent()
Returns the parent navigation expression.

Returns:
the parent navigation expression

setParent

public void setParent(VOCLModel.NavExp newParent)
Sets the parent navigation expression.

Parameters:
newParent - the parent navigation expression to set

setName

public void setName(java.lang.String name)
Sets the classifier role name.

Parameters:
name - the classifier role name

setType

public void setType(java.lang.String type)
Sets the classifier role type

Parameters:
type - the classifier role type

setAttributes

public void setAttributes(java.util.List attributes)
Sets the list of attributes.

Parameters:
attributes - the list of attributes to set

setCommandAttributes

public void setCommandAttributes(java.lang.String name,
                                 java.lang.String type,
                                 java.util.List attributes)
Sets the command attributes.

Parameters:
name - the classifier role name
type - the classifier role type
attributes - the list of attributes