Example usage for javafx.collections ObservableList listIterator

List of usage examples for javafx.collections ObservableList listIterator

Introduction

In this page you can find the example usage for javafx.collections ObservableList listIterator.

Prototype

ListIterator<E> listIterator();

Source Link

Document

Returns a list iterator over the elements in this list (in proper sequence).

Usage

From source file:com.ucu.seguridad.views.AbstractFxmlView.java

/**
 * Scene Builder creates for each FXML document a root container. This method omits the root container (e.g.
 * {@link AnchorPane}) and gives you the access to its first child.
 *
 * @return the first child of the {@link AnchorPane}
 *///  ww  w. ja  v a  2  s . c  om
public Node getViewWithoutRootContainer() {

    ObservableList<Node> children = getView().getChildrenUnmodifiable();
    if (children.isEmpty()) {
        return null;
    }

    return children.listIterator().next();
}