Class GlazedListTreeRowModel<T>
java.lang.Object
org.eclipse.nebula.widgets.nattable.tree.AbstractTreeRowModel<T>
org.eclipse.nebula.widgets.nattable.extension.glazedlists.tree.GlazedListTreeRowModel<T>
- All Implemented Interfaces:
ITreeRowModel<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncollapse
(int index) Collapse the tree node at the given visible index.Will check the whole TreeList for its nodes and collapses them if they are expanded.expand
(int index) Expand the tree node at the given visible 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.Returns theITreeData
that is backed by this tree row model.protected void
Performs the expand operations iteratively without notifying the listeners while processing.protected void
internalExpandToLevel
(int level) Performs the expand operations iteratively without notifying the listeners while processing.protected void
internalExpandToLevel
(int parentIndex, int level) Performs the expand operations iteratively without notifying the listeners while processing.boolean
isCollapsed
(int index) Note: The check only works for visible elements, therefore a check for an element that is below an collapsed element does not work.Methods inherited from class org.eclipse.nebula.widgets.nattable.tree.AbstractTreeRowModel
collapse, depth, expand, expandToLevel, getChildIndexes, getChildren, getChildren, getDirectChildIndexes, getDirectChildren, getDirectChildren, hasChildren, isCollapsed, isCollapsible, isLeaf, notifyListeners, registerRowGroupModelListener
-
Constructor Details
-
GlazedListTreeRowModel
-
-
Method Details
-
isCollapsed
public boolean isCollapsed(int index) Note: The check only works for visible elements, therefore a check for an element that is below an collapsed element does not work.- 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
Collapse the tree node at the given visible index.- Parameters:
index
- The index of the node in the collection that should be collapsed.- Returns:
- Returns an empty list because the list transformation for
expand/collapse is handled by GlazedLists
TreeList
.
-
collapseAll
Will check the whole TreeList for its nodes and collapses them if they are expanded. After executing this method, all nodes in the TreeList will be collapsed.- Returns:
- Returns an empty list because the list transformation for
expand/collapse is handled by GlazedLists
TreeList
.
-
expand
Expand the tree node at the given visible index.- Parameters:
index
- The index of the node in the collection that should be expanded.- Returns:
- Returns an empty list because the list transformation for
expand/collapse is handled by GlazedLists
TreeList
.
-
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
protected void internalExpandToLevel(int parentIndex, int level) Performs the expand operations iteratively without notifying the listeners while processing.- Parameters:
parentIndex
- The index of the node in the collection that should be expanded.level
- The level to which the tree nodes should be expanded.
-
expandAll
Expands all tree nodes.- Returns:
- Returns an empty list because the list transformation for
expand/collapse is handled by GlazedLists
TreeList
.
-
internalExpandAll
protected void internalExpandAll()Performs the expand operations iteratively without notifying the listeners while processing. -
expandToLevel
Expands all tree nodes to a certain level.- Parameters:
level
- The level to which the tree nodes should be expanded.- Returns:
- Returns an empty list because the list transformation for
expand/collapse is handled by GlazedLists
TreeList
.
-
internalExpandToLevel
protected void internalExpandToLevel(int level) Performs the expand operations iteratively without notifying the listeners while processing.- Parameters:
level
- The level to which the tree nodes should be expanded.
-
getTreeData
Returns theITreeData
that is backed by this tree row model.- Overrides:
getTreeData
in classAbstractTreeRowModel<T>
- Returns:
- The
ITreeData
that is backed by this tree row model. - Since:
- 1.6
-