Class TreeExpandCollapseCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
org.eclipse.nebula.widgets.nattable.tree.command.TreeExpandCollapseCommand
- All Implemented Interfaces:
ILayerCommand
- Direct Known Subclasses:
HierarchicalTreeExpandCollapseCommand
Command to expand/collapse a tree node.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionTreeExpandCollapseCommand
(int parentIndex) Create aTreeExpandCollapseCommand
for the given row index.TreeExpandCollapseCommand
(int parentIndex, int columnIndex) Create aTreeExpandCollapseCommand
for the given row and column index.protected
Constructor used for cloning. -
Method Summary
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
cloneCommand, convertToTargetLayer
-
Constructor Details
-
TreeExpandCollapseCommand
public TreeExpandCollapseCommand(int parentIndex) Create aTreeExpandCollapseCommand
for the given row index. By using this constructor there is no information about the column that was clicked. This is sufficient for the default tree implementation, but will not work correctly with a hierarchical tree.- Parameters:
parentIndex
- The index of the row that represents a tree node that should be expanded/collapsed.
-
TreeExpandCollapseCommand
public TreeExpandCollapseCommand(int parentIndex, int columnIndex) Create aTreeExpandCollapseCommand
for the given row and column index. This constructor needs to be used for hierarchical tree implementations as the tree node to expand/collapse can only be identified via the combination of row and column.- Parameters:
parentIndex
- The index of the row that represents a tree node that should be expanded/collapsed.columnIndex
- The index of the column that represents a tree node that should be expanded/collapsed.- Since:
- 1.6
-
TreeExpandCollapseCommand
Constructor used for cloning.- Parameters:
command
- The command to clone.
-
-
Method Details
-
getParentIndex
public int getParentIndex()- Returns:
- The index of the row that represents a tree node that should be expanded/collapsed.
-
getColumnIndex
public int getColumnIndex()- Returns:
- The index of the column that represents a tree node that should be expanded/collapsed.
- Since:
- 1.6
-