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
public class TreeExpandCollapseCommand extends AbstractContextFreeCommand
Command to expand/collapse a tree node.
-
-
Constructor Summary
Constructors Modifier Constructor Description TreeExpandCollapseCommand(int parentIndex)
Create aTreeExpandCollapseCommand
for the given row index.TreeExpandCollapseCommand(int parentIndex, int columnIndex)
Create aTreeExpandCollapseCommand
for the given row and column index.protected
TreeExpandCollapseCommand(TreeExpandCollapseCommand command)
Constructor used for cloning.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnIndex()
int
getParentIndex()
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
cloneCommand, convertToTargetLayer
-
-
-
-
Constructor Detail
-
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
protected TreeExpandCollapseCommand(TreeExpandCollapseCommand command)
Constructor used for cloning.- Parameters:
command
- The command to clone.
-
-