T - The type of the value property within TreeItem.public class FilterableTreeItem<T>
extends javafx.scene.control.TreeItem<T>
TreeItem with the possibility to filter its children. To enable filtering
it is necessary to set the TreeItemPredicate. If a predicate is set, then the tree item
will also use this predicate to filter its children (if they are of the type FilterableTreeItem).
A tree item that has children will not be filtered. The predicate will only be evaluated, if the
tree item is a leaf. Since the predicate is also set for the child tree items, the tree item in question
can turn into a leaf if all its children are filtered.| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<TreeItemPredicate<T>> |
predicate |
| Constructor and Description |
|---|
FilterableTreeItem(T value)
Creates a new
TreeItem with sorted children. |
| Modifier and Type | Method and Description |
|---|---|
javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>> |
getChildren()
This method overrides
TreeItem.getChildren() and returns an
unmodifiable FilteredList as the children may only be changed
via the underlying model. |
javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>> |
getInternalChildren()
Returns the list of children that is backing the filtered list.
|
TreeItemPredicate<T> |
getPredicate() |
boolean |
isLeaf() |
javafx.beans.property.ObjectProperty<TreeItemPredicate<T>> |
predicateProperty() |
void |
setPredicate(TreeItemPredicate<T> predicate)
Set the predicate
|
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, valuePropertypublic final javafx.beans.property.ObjectProperty<TreeItemPredicate<T>> predicateProperty
getPredicate(),
setPredicate(TreeItemPredicate)public FilterableTreeItem(T value)
TreeItem with sorted children. To enable sorting it is
necessary to set the TreeItemComparator. If no comparator is set, then
the tree item will attempt so bind itself to the comparator of its parent.value - the value of the TreeItempublic javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>> getChildren()
TreeItem.getChildren() and returns an
unmodifiable FilteredList as the children may only be changed
via the underlying model.getChildren in class javafx.scene.control.TreeItem<T>getInternalChildren()public javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>> getInternalChildren()
public boolean isLeaf()
isLeaf in class javafx.scene.control.TreeItem<T>public final javafx.beans.property.ObjectProperty<TreeItemPredicate<T>> predicateProperty()
getPredicate(),
setPredicate(TreeItemPredicate)public final TreeItemPredicate<T> getPredicate()
public final void setPredicate(TreeItemPredicate<T> predicate)
predicate - the predicate