List of usage examples for javafx.scene.control TreeView rootProperty
public final ObjectProperty<TreeItem<T>> rootProperty()
From source file:acmi.l2.clientmod.xdat.Controller.java
private ContextMenu createContextMenu(TreeView<Object> elements) { ContextMenu contextMenu = new ContextMenu(); InvalidationListener il = observable1 -> updateContextMenu(contextMenu, elements); elements.rootProperty().addListener(il); elements.getSelectionModel().selectedItemProperty().addListener(il); return contextMenu; }