|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of the elements in the treepublic interface ITreeRowModel<T>
The ITreeRowModel
is used by the TreeLayer
to build up and
interact with the tree model. It deals with the nodes and the corresponding
expand/collapse states.
Method Summary | |
---|---|
List<Integer> |
collapse(int parentIndex)
Collapses the tree node at the given index. |
List<Integer> |
collapse(T object)
Collapse the tree node that represent the given object. |
List<Integer> |
collapseAll()
Collapses all tree nodes. |
int |
depth(int index)
|
List<Integer> |
expand(int parentIndex)
Expands the tree node at the given index. |
List<Integer> |
expand(T object)
Expands the tree node that represents the given object. |
List<Integer> |
expandAll()
Expands all tree nodes. |
List<Integer> |
expandToLevel(int level)
Expands all tree nodes to a certain level. |
List<Integer> |
expandToLevel(int parentIndex,
int level)
Expands the tree node at the given index to a certain level. |
List<Integer> |
expandToLevel(T object,
int level)
Expands the tree node that represents the given object to a certain level. |
List<Integer> |
getChildIndexes(int parentIndex)
This method returns all visible child indexes below the node at the given index. |
List<T> |
getChildren(int parentIndex)
This method returns all children below the node at the given index. |
List<Integer> |
getDirectChildIndexes(int parentIndex)
This method returns only the direct visible child indexes of the node at the given index. |
List<T> |
getDirectChildren(int parentIndex)
This method returns only the direct children of the node at the given index. |
String |
getObjectAtIndexAndDepth(int index,
int depth)
Deprecated. formatting should be done in the IExportFormatter |
boolean |
hasChildren(int index)
|
boolean |
isCollapsed(int index)
|
boolean |
isCollapsed(T object)
|
boolean |
isCollapsible(int index)
Checks if the tree node at the given index is collapsible or not. |
boolean |
isLeaf(int index)
|
Method Detail |
---|
int depth(int index)
index
- The index of the tree element to check.
boolean isLeaf(int index)
index
- The index of the tree element to check.
true
if the tree element at the given index has no
children and therefore is a leaf, false
if the tree
element has children and therefore is a node.@Deprecated String getObjectAtIndexAndDepth(int index, int depth)
IExportFormatter
Currently only used for exporting a tree to excel. Possibly not necessary in the future when implementing an exporter that formats converts and formats tree node values in another way.
index
- The index of the requested tree node.depth
- The depth of the tree node at the requested index.
boolean hasChildren(int index)
index
- The index of the tree element to check.
true
if the tree element at the given index has
children, false
if not.boolean isCollapsed(int index)
index
- The index of the tree element to check.
true
if the children of the tree node at the given
index are visible, false
if not.boolean isCollapsed(T object)
object
- The element that should be checked.
true
if the children of the given element are
visible, false
if not.boolean isCollapsible(int index)
index
- The index of the tree node to check.
true
if the tree node at the given index is
collapsible, false
if not.List<Integer> collapse(int parentIndex)
parentIndex
- The index of the node in the collection that should be
collapsed.
List<Integer> collapse(T object)
object
- The object that represents the tree node to collapse.
List<Integer> collapseAll()
List<Integer> expand(int parentIndex)
parentIndex
- The index of the node in the collection that should be
expanded.
List<Integer> expandToLevel(int parentIndex, int level)
parentIndex
- The index of the node in the collection that should be
expanded.level
- The level to which the tree node should be expanded.
List<Integer> expand(T object)
object
- The object that represents the tree node to expand.
List<Integer> expandToLevel(T object, int level)
object
- The object that represents the tree node to expand.level
- The level to which the tree node should be expanded.
List<Integer> expandAll()
List<Integer> expandToLevel(int level)
level
- The level to which the tree nodes should be expanded.
List<Integer> getChildIndexes(int parentIndex)
If you only need to get the direct child indexes of the node at the given
index you need to use getDirectChildIndexes(int)
instead.
parentIndex
- The index for which the child indexes are requested.
List<Integer> getDirectChildIndexes(int parentIndex)
If you need to get all child indexes of the node at the given index you
need to use getChildIndexes(int)
instead.
parentIndex
- The index for which the direct child indexes are requested.
List<T> getChildren(int parentIndex)
If you only need to get the direct children of the node at the given
index you need to use getDirectChildren(int)
instead.
parentIndex
- The index for which the children are requested.
List<T> getDirectChildren(int parentIndex)
If you need to get all children of the node at the given index you need
to use getChildren(int)
instead.
parentIndex
- The index for which the direct children are requested.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |