com.mindfusion.diagramming
Class ExpandTreeViewItemCmd

java.lang.Object
  extended by com.mindfusion.diagramming.Command
      extended by com.mindfusion.diagramming.ExpandTreeViewItemCmd

public class ExpandTreeViewItemCmd
extends Command

Implements support for undo of TreeViewItem collapse/expand operations.


Constructor Summary
ExpandTreeViewItemCmd(TreeViewNode node, TreeViewItem item)
          Initializes a new instance of the ExpandTreeViewItemCmd class.
 
Method Summary
 void execute(boolean undoEnabled)
          Command.execute(boolean) override.
 TreeViewItem item()
          Gets the TreeViewItem that has been collapsed or expanded.
 void redo()
          Command.redo() override.
 void undo()
          Command.undo() override.
 
Methods inherited from class com.mindfusion.diagramming.Command
addSubCmd, adopt, getContext, getSubCommands, getTitle, isContainerOf, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpandTreeViewItemCmd

public ExpandTreeViewItemCmd(TreeViewNode node,
                             TreeViewItem item)
Initializes a new instance of the ExpandTreeViewItemCmd class.

Parameters:
node - The parent TreeViewNode.
item - The TreeViewItem that has been collapsed or expanded.
Method Detail

execute

public void execute(boolean undoEnabled)
Command.execute(boolean) override.

Specified by:
execute in class Command
Parameters:
undoEnabled - Specifies whether undo/redo is enabled. If undo is disabled, the command won't be saved in undo history and will never be called to undo or redo itself. In such case you might choose to skip some housekeeping operations such as saving state variables for later undo/redo.

undo

public void undo()
Command.undo() override.

Overrides:
undo in class Command

redo

public void redo()
Command.redo() override.

Overrides:
redo in class Command

item

public TreeViewItem item()
Gets the TreeViewItem that has been collapsed or expanded.