com.pnp.xfeature.commands
Class ExpandCollapseCommand

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

public class ExpandCollapseCommand
extends Command

The Command class to colapses a node (hide its subnodes) or expand a node (show its subnodes)

Author:
Kamil Ekstein, created on 13.11.2004, totally redesigned on 27.4.2005 by Ondrej Rohlik

Constructor Summary
ExpandCollapseCommand(FeatureDiagramModel diagram, FeatureNodeModel node)
          Creates command that sets the node to be collpased and its parent
 
Method Summary
 void execute()
          calls the expandCollapseNode() of the FeatureDiagramModel that checks the vaue of the collapsed flag of the feature node, based on its value either expands or colapses the node
 void redo()
          calls execute() method
 void undo()
          calls the expandCollapseNode() of the FeatureDiagramModel that checks the vaue of the collapsed flag of the feature node, based on its value either expands or colapses the node
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpandCollapseCommand

public ExpandCollapseCommand(FeatureDiagramModel diagram,
                             FeatureNodeModel node)
Creates command that sets the node to be collpased and its parent

Parameters:
diagram -
node -
Method Detail

execute

public void execute()
calls the expandCollapseNode() of the FeatureDiagramModel that checks the vaue of the collapsed flag of the feature node, based on its value either expands or colapses the 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 the expandCollapseNode() of the FeatureDiagramModel that checks the vaue of the collapsed flag of the feature node, based on its value either expands or colapses the node

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


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