Interface ITreeRowModel<T>

    • Method Detail

      • depth

        int depth​(int index)
        Parameters:
        index - The index of the tree element to check.
        Returns:
        The number of ancestors of the node at the specified index. Root nodes have depth 0, other nodes depth is one greater than the depth of their parent node.
      • isLeaf

        boolean isLeaf​(int index)
        Parameters:
        index - The index of the tree element to check.
        Returns:
        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.
      • hasChildren

        boolean hasChildren​(int index)
        Parameters:
        index - The index of the tree element to check.
        Returns:
        true if the tree element at the given index has children, false if not.
      • isCollapsed

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

        boolean isCollapsed​(T object)
        Parameters:
        object - The element that should be checked.
        Returns:
        true if the children of the given element are visible, false if not.
      • isCollapsible

        boolean isCollapsible​(int index)
        Checks if the tree node at the given index is collapsible or not.
        Parameters:
        index - The index of the tree node to check.
        Returns:
        true if the tree node at the given index is collapsible, false if not.
      • collapse

        List<Integer> collapse​(int parentIndex)
        Collapses the tree node at the given index.
        Parameters:
        parentIndex - 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.
      • collapse

        List<Integer> collapse​(T object)
        Collapse the tree node that represent the given object.
        Parameters:
        object - The object that represents the tree node to collapse.
        Returns:
        The indexes of all children of the collapsed tree node that become invisible by performing the collapse operation.
      • collapseAll

        List<Integer> collapseAll()
        Collapses all tree nodes.
        Returns:
        The indexes of all children that are hidden after the collapse operation is performed.
      • expand

        List<Integer> expand​(int parentIndex)
        Expands the tree node at the given index.
        Parameters:
        parentIndex - 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.
      • expandToLevel

        List<Integer> expandToLevel​(int parentIndex,
                                    int level)
        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.
      • expand

        List<Integer> expand​(T object)
        Expands the tree node that represents the given object.
        Parameters:
        object - The object that represents the tree node to expand.
        Returns:
        The indexes of all children of the expanded tree node that become visible by performing the expand operation.
      • expandToLevel

        List<Integer> expandToLevel​(T object,
                                    int level)
        Expands the tree node that represents the given object to a certain level.
        Parameters:
        object - The object that represents the tree node to expand.
        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.
      • expandAll

        List<Integer> expandAll()
        Expands all tree nodes.
        Returns:
        The indexes of all children that are showed after the expand operation is performed.
      • expandToLevel

        List<Integer> expandToLevel​(int level)
        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.
      • getChildIndexes

        List<Integer> getChildIndexes​(int parentIndex)
        This method returns all visible child indexes below the node at the given index. It search all the way down the tree structure to find every child, even the sub children, sub sub children and so on.

        If you only need to get the direct child indexes of the node at the given index you need to use getDirectChildIndexes(int) instead.

        Parameters:
        parentIndex - The index for which the child indexes are requested.
        Returns:
        The list of all child indexes for the node at the given index.
      • getDirectChildIndexes

        List<Integer> getDirectChildIndexes​(int parentIndex)
        This method returns only the direct visible child indexes of the node at the given index. It does not search all the way down for further sub children.

        If you need to get all child indexes of the node at the given index you need to use getChildIndexes(int) instead.

        Parameters:
        parentIndex - The index for which the direct child indexes are requested.
        Returns:
        The list of the direct child indexes for the node at the given index.
      • getChildren

        List<T> getChildren​(int parentIndex)
        This method returns all children below the node at the given index. It search all the way down the tree structure to find every child, even the sub children, sub sub children and so on.

        If you only need to get the direct children of the node at the given index you need to use getDirectChildren(int) instead.

        Parameters:
        parentIndex - The index for which the children are requested.
        Returns:
        The list of all children for the node at the given index.
      • getDirectChildren

        List<T> getDirectChildren​(int parentIndex)
        This method returns only the direct children of the node at the given index. It does not search all the way down for further sub children.

        If you need to get all children of the node at the given index you need to use getChildren(int) instead.

        Parameters:
        parentIndex - The index for which the direct children are requested.
        Returns:
        The list of the direct children for the node at the given index.