TreeView.getTreeItemLevel(TreeItem)
Returns the number of levels of 'indentation' of the given TreeItem,
based on how many times javafx.scene.control.TreeItem.getParent()
can be recursively called. If the TreeItem does not have any parent set,
the returned value will be zero. For each time getParent() is recursively
called, the returned value is incremented by one.
Important note: This method is deprecated as it does
not consider the root node. This means that this method will iterate
past the root node of the TreeView control, if the root node has a parent.
If this is important, call TreeView.getTreeItemLevel(TreeItem)
instead.
node | The TreeItem for which the level is needed. |
Diagram: Tree