T
- item typeU
- Type from which tree items are created.public class LazyTreeItem<T,U>
extends javafx.scene.control.TreeItem<T>
Constructor and Description |
---|
LazyTreeItem(T pItem,
Callable<Collection<U>> pChildElementsCallable,
Function<U,javafx.scene.control.TreeItem<T>> pElementToTreeItemFunction)
If callable is null, node is considered a leaf.
|
Modifier and Type | Method and Description |
---|---|
javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>> |
getChildren() |
protected boolean |
isGetChildrenCalled() |
boolean |
isLeaf() |
addEventHandler, branchCollapsedEvent, branchExpandedEvent, buildEventDispatchChain, childrenModificationEvent, expandedItemCountChangeEvent, expandedProperty, getGraphic, getParent, getValue, graphicChangedEvent, graphicProperty, isExpanded, leafProperty, nextSibling, nextSibling, parentProperty, previousSibling, previousSibling, removeEventHandler, setExpanded, setGraphic, setValue, toString, treeNotificationEvent, valueChangedEvent, valueProperty
public LazyTreeItem(T pItem, Callable<Collection<U>> pChildElementsCallable, Function<U,javafx.scene.control.TreeItem<T>> pElementToTreeItemFunction)
pItem
- Tree item.pChildElementsCallable
- Callable, which will be invoked on a background thread
to provide list of child elements. Note that elements must be immutable.pElementToTreeItemFunction
- Function, which will be invoked on the JavaFX thread
to create children.protected boolean isGetChildrenCalled()
public boolean isLeaf()
isLeaf
in class javafx.scene.control.TreeItem<T>
Copyright © 2023. All rights reserved.