vocleditor.commands
Class EditAttributeCommand

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

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

Command class for edit the attribute properties.


Constructor Summary
EditAttributeCommand()
          The default constructor.
 
Method Summary
 void execute()
          Executes the command.
 void redo()
          Redo command execution.
 void setAttribute(VOCLModel.Attribute attribute)
          Sets the attribute.
 void setCommandAttributes(java.lang.String name, java.lang.String type, java.lang.String value, java.lang.String variableName)
          Sets the command attributes.
 void setName(java.lang.String name)
          Sets the name of the attribute.
 void setParent(VOCLModel.ClassifierRole newParent)
          Sets the parent classifier role.
 void setType(java.lang.String type)
          Sets the type of the attribute.
 void setValue(java.lang.String value)
          Sets the value of the attribute.
 void setVariableName(java.lang.String variableName)
          Sets the variable name.
 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

EditAttributeCommand

public EditAttributeCommand()
The default constructor.

Method Detail

execute

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

setAttribute

public void setAttribute(VOCLModel.Attribute attribute)
Sets the attribute.

Parameters:
attribute - the attribute

setParent

public void setParent(VOCLModel.ClassifierRole newParent)
Sets the parent classifier role.

Parameters:
newParent - the parent

setName

public void setName(java.lang.String name)
Sets the name of the attribute.

Parameters:
name - the name

setType

public void setType(java.lang.String type)
Sets the type of the attribute.

Parameters:
type - the type

setValue

public void setValue(java.lang.String value)
Sets the value of the attribute.

Parameters:
value - the value

setVariableName

public void setVariableName(java.lang.String variableName)
Sets the variable name.

Parameters:
variableName - the variable name

setCommandAttributes

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

Parameters:
name - the attribute name
type - the attribute type
value - the attribute value
variableName - the attribute variable name