Class TreeRowModel<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.tree.AbstractTreeRowModel<T>
org.eclipse.nebula.widgets.nattable.tree.TreeRowModel<T>
- Type Parameters:
T
- The type of the elements in the tree
- All Implemented Interfaces:
ITreeRowModel<T>
Implementation of
ITreeRowModel
that is used to perform
expand/collapse operations using the approach of hiding and showing rows.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollapse
(int index) Collapses the tree node at the given index.Collapses all tree nodes.expand
(int index) Expands the tree node at the given index.Expands all tree nodes.expandToLevel
(int level) Expands all tree nodes to a certain level.expandToLevel
(int parentIndex, int level) Expands the tree node at the given index to a certain level.protected Collection<Integer>
internalCollapse
(int index) Performs the collapse operation without notifying the listeners while processing.protected Collection<Integer>
internalExpand
(int index) Performs the expand operations iteratively without notifying the listeners while processing.protected Collection<Integer>
internalExpandToLevel
(int index, int level) Performs the expand operations iteratively without notifying the listeners while processing.boolean
isCollapsed
(int index) Methods inherited from class org.eclipse.nebula.widgets.nattable.tree.AbstractTreeRowModel
collapse, depth, expand, expandToLevel, getChildIndexes, getChildren, getChildren, getDirectChildIndexes, getDirectChildren, getDirectChildren, getTreeData, hasChildren, isCollapsed, isCollapsible, isLeaf, notifyListeners, registerRowGroupModelListener
-
Field Details
-
parentIndexes
-
-
Constructor Details
-
TreeRowModel
-
-
Method Details
-
isCollapsed
public boolean isCollapsed(int index) - Parameters:
index
- The index of the tree element to check.- Returns:
true
if the children of the tree node at the given index are visible,false
if not.
-
collapse
Description copied from interface:ITreeRowModel
Collapses the tree node at the given index.- Parameters:
index
- The index of the node in the collection that should be collapsed.- Returns:
- The indexes of all children of the collapsed tree node that become invisible by performing the collapse operation.
-
internalCollapse
Performs the collapse operation without notifying the listeners while processing.- Parameters:
index
- The index of the node in the collection that should be collapsed.- Returns:
- The indexes of all children of the collapsed tree node that become invisible by performing the collapse operation.
-
collapseAll
Description copied from interface:ITreeRowModel
Collapses all tree nodes.- Returns:
- The indexes of all children that are hidden after the collapse operation is performed.
-
expand
Description copied from interface:ITreeRowModel
Expands the tree node at the given index.- Parameters:
index
- The index of the node in the collection that should be expanded.- Returns:
- The indexes of all children of the expanded tree node that become visible by performing the expand operation.
-
internalExpand
Performs the expand operations iteratively without notifying the listeners while processing.- Parameters:
index
- The index of the node in the collection that should be expanded.- Returns:
- The indexes of all children of the expanded tree node that become visible by performing the expand operation.
-
expandAll
Description copied from interface:ITreeRowModel
Expands all tree nodes.- Returns:
- The indexes of all children that are showed after the expand operation is performed.
-
expandToLevel
Description copied from interface:ITreeRowModel
Expands all tree nodes to a certain level.- Parameters:
level
- The level to which the tree nodes should be expanded.- Returns:
- The indexes of all children that are showed after the expand operation is performed.
-
expandToLevel
Description copied from interface:ITreeRowModel
Expands the tree node at the given index to a certain level.- Parameters:
parentIndex
- The index of the node in the collection that should be expanded.level
- The level to which the tree node should be expanded.- Returns:
- The indexes of all children that are showed after the expand operation is performed.
-
internalExpandToLevel
Performs the expand operations iteratively without notifying the listeners while processing.- Parameters:
index
- The index of the node in the collection that should be expanded.level
- The level to which the tree nodes should be expanded.- Returns:
- The indexes of all children of the expanded tree node that become visible by performing the expand operation.
-