Example usage for javafx.scene.control TreeView rootProperty

List of usage examples for javafx.scene.control TreeView rootProperty

Introduction

In this page you can find the example usage for javafx.scene.control TreeView rootProperty.

Prototype

public final ObjectProperty<TreeItem<T>> rootProperty() 

Source Link

Document

Property representing the root node of the TreeView.

Usage

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;
}