Example usage for javafx.scene.control TreeTableView showRootProperty

List of usage examples for javafx.scene.control TreeTableView showRootProperty

Introduction

In this page you can find the example usage for javafx.scene.control TreeTableView showRootProperty.

Prototype

public final BooleanProperty showRootProperty() 

Source Link

Document

Property that represents whether or not the TreeTableView root node is visible.

Usage

From source file:org.eclipse.jubula.rc.javafx.tester.adapter.TreeTableOperationContext.java

@Override
public Object[] getRootNodes() {
    Object[] result = EventThreadQueuerJavaFXImpl.invokeAndWait("getRootNodes", new Callable<Object[]>() { //$NON-NLS-1$

        @Override/* ww  w  . j ava 2 s .  c o  m*/
        public Object[] call() throws Exception {
            TreeTableView<?> tree = getTree();

            // If the root is visible, just return that.
            if (tree.showRootProperty().getValue()) {
                return new Object[] { tree.getRoot() };
            }

            // If the root is not visible, return all direct
            // children of the
            // non-visible root.
            return getChildren(tree.getRoot());
        }
    });
    return result;
}