|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCommand
com.pnp.xfeature.commands.AddCommand
com.pnp.xfeature.commands.AddCardinalityCommand
public class AddCardinalityCommand
The Command class used to add a new cardinality node to a feature model diagram
| Constructor Summary | |
|---|---|
AddCardinalityCommand(FeatureDiagramModel diagram,
FeatureNodeModel node,
java.lang.String childNodeType,
int nodePosition,
java.lang.String propertySet)
Creates command that adds new cardinality element to the feature model s |
|
| Method Summary | |
|---|---|
void |
execute()
calls addCardinality() method of the FeatureDiagramModel that adds the new element to DOM model and consequently updates the canvas |
void |
redo()
calls returnCardinality() method of the FeatureDiagramModel that adds the element to DOM model at the right position and consequently updates the canvas |
void |
undo()
calls unAddCardinality() method of the FeatureDiagramModel that saves the current position of the node in its parent's list of nodes (in the DOM model), removes the node from this list and consequently updates the canvas |
| Methods inherited from class com.pnp.xfeature.commands.AddCommand |
|---|
getNodePosition |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AddCardinalityCommand(FeatureDiagramModel diagram,
FeatureNodeModel node,
java.lang.String childNodeType,
int nodePosition,
java.lang.String propertySet)
diagram - the feature modelnode - the parent nodechildNodeType - the type o node that is to be addednodePosition - position where the new element is to be inserted (among other siblings)
ToDo: rename node to parent, remove property set| Method Detail |
|---|
public void execute()
execute in class AddCommandorg.eclipse.gef.commands.Command#execute()public void redo()
redo in class AddCommandorg.eclipse.gef.commands.Command#redo()public void undo()
undo in class AddCommandorg.eclipse.gef.commands.Command#undo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||