List of usage examples for javafx.scene.control TreeView showRootProperty
public final BooleanProperty showRootProperty()
From source file:org.eclipse.jubula.rc.javafx.tester.adapter.TreeOperationContext.java
@Override public Object[] getRootNodes() { Object[] result = EventThreadQueuerJavaFXImpl.invokeAndWait("getRootNodes", new Callable<Object[]>() { //$NON-NLS-1$ @Override/*from w w w . ja v a2s.c om*/ public Object[] call() throws Exception { TreeView<?> tree = (TreeView<?>) 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; }