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:
  • Constructor Details

    • TreeExpandToLevelCommand

      public TreeExpandToLevelCommand(int level)
      Create a TreeExpandToLevelCommand 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 a TreeExpandToLevelCommand 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 Details

    • 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.