public class ExpandTreeViewItemCmd extends Command
TreeViewItem
collapse/expand operations.Constructor and Description |
---|
ExpandTreeViewItemCmd(TreeViewNode node,
TreeViewItem item)
Initializes a new instance of the
ExpandTreeViewItemCmd class. |
Modifier and Type | Method and Description |
---|---|
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. |
addSubCmd, adopt, getContext, getSubCommands, getTitle, isContainerOf, setTitle
public ExpandTreeViewItemCmd(TreeViewNode node, TreeViewItem item)
ExpandTreeViewItemCmd
class.node
- The parent TreeViewNode
.item
- The TreeViewItem
that has been collapsed or expanded.public void execute(boolean undoEnabled)
Command.execute(boolean)
override.execute
in class Command
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.public void undo()
Command.undo()
override.public void redo()
Command.redo()
override.public TreeViewItem item()
TreeViewItem
that has been collapsed or expanded.