Example usage for javafx.scene.control ButtonBar getButtons

List of usage examples for javafx.scene.control ButtonBar getButtons

Introduction

In this page you can find the example usage for javafx.scene.control ButtonBar getButtons.

Prototype

public final ObservableList<Node> getButtons() 

Source Link

Document

Placing buttons inside this ObservableList will instruct the ButtonBar to position them relative to each other based on their specified ButtonData .

Usage

From source file:io.github.moosbusch.permagon.configuration.builder.spi.AbstractPermagonBuilder.java

protected void buildButtonBar(ButtonBar buttonBar) {
    if (containsKey(NODE_BUTTONS_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_BUTTONS_PROPERTY));

        if (obj instanceof ObservableMap) {
            ObservableMap propertiesMap = (ObservableMap) obj;

            propertiesMap.values().stream().filter((propertyValue) -> (propertyValue instanceof ObservableList))
                    .forEach((propertyValue) -> {
                        buttonBar.getButtons().addAll((ObservableList) propertyValue);
                    });/*from w  w  w .j a v a2 s.c o  m*/
        }
    }
}