Class TreeExpandToLevelCommand
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
-
- org.eclipse.nebula.widgets.nattable.tree.command.TreeExpandToLevelCommand
-
- All Implemented Interfaces:
ILayerCommand
public class TreeExpandToLevelCommand extends AbstractContextFreeCommand
Command to expand all nodes to a specified level in a tree.- See Also:
TreeLayer
,TreeExpandToLevelCommandHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description TreeExpandToLevelCommand(int level)
Create aTreeExpandToLevelCommand
that expands the nodes in a tree to the given level.TreeExpandToLevelCommand(Integer parentIndex, int level)
Create aTreeExpandToLevelCommand
that expands the node at the given index in a tree to the given level.protected
TreeExpandToLevelCommand(TreeExpandToLevelCommand command)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLevel()
Integer
getParentIndex()
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
cloneCommand, convertToTargetLayer
-
-
-
-
Constructor Detail
-
TreeExpandToLevelCommand
public TreeExpandToLevelCommand(int level)
Create aTreeExpandToLevelCommand
that expands the nodes in a tree to the given level. Nodes below the given level will not be expanded and stay collapsed.- Parameters:
level
- The level to which the tree should be expanded.
-
TreeExpandToLevelCommand
public TreeExpandToLevelCommand(Integer parentIndex, int level)
Create aTreeExpandToLevelCommand
that expands the node at the given index in a tree to the given level. Nodes below the given level will not be expanded and stay collapsed.Using a parentIndex of
- Parameters:
parentIndex
- The index of the tree node in the tree that should be expanded.null
if the whole tree should be expanded to a certain level.level
- The level to which the tree node should be expanded.
-
TreeExpandToLevelCommand
protected TreeExpandToLevelCommand(TreeExpandToLevelCommand command)
-
-
Method Detail
-
getParentIndex
public Integer getParentIndex()
- Returns:
- The index of the tree node in the tree that should be expanded to
a certain level or
null
if the whole tree should be expanded to a certain level.
-
getLevel
public int getLevel()
- Returns:
- The level to which the tree should be expanded.
-
-