Example usage for javafx.collections ObservableMap values

List of usage examples for javafx.collections ObservableMap values

Introduction

In this page you can find the example usage for javafx.collections ObservableMap values.

Prototype

Collection<V> values();

Source Link

Document

Returns a Collection view of the values contained in this map.

Usage

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

protected void buildSplitPane(SplitPane pane) {
    if (containsKey(NODE_ITEMS_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_ITEMS_PROPERTY));

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

            propertiesMap.values().stream().filter((propertyValue) -> (propertyValue instanceof ObservableList))
                    .forEach((propertyValue) -> {
                        pane.getItems().addAll((ObservableList) propertyValue);
                    });//from w ww . j av  a  2s  .  c  o  m
        }
    }
}

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

protected void buildToolBar(ToolBar pane) {
    if (containsKey(NODE_ITEMS_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_ITEMS_PROPERTY));

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

            propertiesMap.values().stream().filter((propertyValue) -> (propertyValue instanceof ObservableList))
                    .forEach((propertyValue) -> {
                        pane.getItems().addAll((ObservableList) propertyValue);
                    });//  w  w  w. j  a va  2 s . c  o  m
        }
    }
}

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

protected void buildMenuBar(MenuBar pane) {
    if (containsKey(NODE_MENUS_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_MENUS_PROPERTY));

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

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

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

protected void buildMenu(Menu pane) {
    if (containsKey(NODE_ITEMS_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_ITEMS_PROPERTY));

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

            propertiesMap.values().stream().filter((propertyValue) -> (propertyValue instanceof ObservableList))
                    .forEach((propertyValue) -> {
                        pane.getItems().addAll((ObservableList) propertyValue);
                    });/*w w  w .j  a v a2s.com*/
        }
    }
}

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  va2s .c o m
        }
    }
}

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

protected void buildAccordion(Accordion accordion) {
    if (containsKey(NODE_PANES_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_PANES_PROPERTY));

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

            propertiesMap.values().stream().filter((propertyValue) -> (propertyValue instanceof ObservableList))
                    .forEach((propertyValue) -> {
                        accordion.getPanes().addAll((ObservableList) propertyValue);
                    });/*from   w  w w .  ja  v a2s . c o  m*/
        }
    }
}

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

protected void buildScrollPane(ScrollPane pane) {
    if (containsKey(NODE_PROPERTIES_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_PROPERTIES_PROPERTY));

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

            for (Object propertyValue : propertiesMap.values()) {
                if (propertyValue instanceof Node) {
                    pane.setContent((Node) propertyValue);
                    return;
                }//from  w w w.  j  av a  2  s.  c o  m
            }
        }
    }
}

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

protected void buildTitledPane(TitledPane pane) {
    if (containsKey(NODE_PROPERTIES_PROPERTY)) {
        Object obj = Objects.requireNonNull(get(NODE_PROPERTIES_PROPERTY));

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

            for (Object propertyValue : propertiesMap.values()) {
                if (propertyValue instanceof Node) {
                    pane.setContent((Node) propertyValue);
                    return;
                }/*from w w  w  .j  a v  a  2 s  .c om*/
            }
        }
    }
}