com.pnp.xfeature.commands
Class RemovePropertySetCommand

java.lang.Object
  extended by Command
      extended by com.pnp.xfeature.commands.RemovePropertySetCommand

public class RemovePropertySetCommand
extends Command

The Command class used to remove a property set from a feature model diagram

Author:
Ondrej Rohlik, created on 13.4.2005

Constructor Summary
RemovePropertySetCommand(FeatureDiagramModel diagram, FeatureNodeModel node, java.lang.String childNodeType)
          Creates command that removes a paroperty set from its parent node
 
Method Summary
 void execute()
          calls the removePropertySet() method of the FeatureDiagramModel class that saves the position of the property set node and removes it from its parent node
 int getNodeLastPosition()
          returns the last position of the propery set node in the list of child nodes of its parent
 void redo()
          calls execute() method
 void undo()
          calls returnPropertySet() method of FeatureDiagramModel class that inserts the property set node to its original position in the DOM model
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemovePropertySetCommand

public RemovePropertySetCommand(FeatureDiagramModel diagram,
                                FeatureNodeModel node,
                                java.lang.String childNodeType)
Creates command that removes a paroperty set from its parent node

Parameters:
diagram - feature model
node - parent node with the property set to be removed
childNodeType - name of the property set to be removed
Method Detail

execute

public void execute()
calls the removePropertySet() method of the FeatureDiagramModel class that saves the position of the property set node and removes it from its parent node

See Also:
org.eclipse.gef.commands.Command#execute()

redo

public void redo()
calls execute() method

See Also:
org.eclipse.gef.commands.Command#redo()

undo

public void undo()
calls returnPropertySet() method of FeatureDiagramModel class that inserts the property set node to its original position in the DOM model

See Also:
org.eclipse.gef.commands.Command#undo()

getNodeLastPosition

public int getNodeLastPosition()
returns the last position of the propery set node in the list of child nodes of its parent

Returns:
nodeLastPosition


Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.