Example usage for javafx.scene.control TreeItem isExpanded

List of usage examples for javafx.scene.control TreeItem isExpanded

Introduction

In this page you can find the example usage for javafx.scene.control TreeItem isExpanded.

Prototype

public final boolean isExpanded() 

Source Link

Document

Returns the expanded state of this TreeItem.

Usage

From source file:org.jevis.jeconfig.plugin.classes.ClassTree.java

private void expand(TreeItem<JEVisClass> item, boolean expand) {
    if (!item.isLeaf()) {
        if (item.isExpanded() && !expand) {
            item.setExpanded(expand);/*from   w  w w  .j  a  va  2 s. c om*/
        } else if (!item.isExpanded() && expand) {
            item.setExpanded(expand);
        }

        for (TreeItem<JEVisClass> child : item.getChildren()) {
            expand(child, expand);
        }
    }
}