Class HierarchicalTreeExpandCollapseCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
org.eclipse.nebula.widgets.nattable.tree.command.TreeExpandCollapseCommand
org.eclipse.nebula.widgets.nattable.hierarchical.command.HierarchicalTreeExpandCollapseCommand
- All Implemented Interfaces:
ILayerCommand
Command to expand or collapse a node in the HierarchicalTreeLayer.
Specialization of the
TreeExpandCollapseCommand that adds the option
to specify to which level the node should be expanded.- Since:
- 1.6
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHierarchicalTreeExpandCollapseCommand(int rowIndex, int columnIndex) Creates a command that will expand/collapse the node at the given coordinates.HierarchicalTreeExpandCollapseCommand(int rowIndex, int columnIndex, int toLevel) Creates a command that will expand/collapse the node at the given coordinates and subsequent nodes if specified by the level parameter. -
Method Summary
Methods inherited from class org.eclipse.nebula.widgets.nattable.tree.command.TreeExpandCollapseCommand
getColumnIndex, getParentIndexMethods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
cloneCommand, convertToTargetLayer
-
Constructor Details
-
HierarchicalTreeExpandCollapseCommand
public HierarchicalTreeExpandCollapseCommand(int rowIndex, int columnIndex) Creates a command that will expand/collapse the node at the given coordinates.- Parameters:
rowIndex- The row index of the coordinate that should be expanded/collapsed.columnIndex- The column index of the coordinate that should be expanded/collapsed.
-
HierarchicalTreeExpandCollapseCommand
public HierarchicalTreeExpandCollapseCommand(int rowIndex, int columnIndex, int toLevel) Creates a command that will expand/collapse the node at the given coordinates and subsequent nodes if specified by the level parameter.- Parameters:
rowIndex- The row index of the coordinate that should be expanded/collapsed.columnIndex- The column index of the coordinate that should be expanded/collapsed.toLevel- The level to which the node should be expanded to, or -1 if only the given node should be expanded.
-
-
Method Details
-
getToLevel
public int getToLevel()- Returns:
- The level to which the node should be expanded to, or -1 if only the given node should be expanded.
-