SettingsPane stays empty when populated with Options

19 Views Asked by At

I am trying to use a SettingsPane for managing my application options. While the SettingsPane is showing in my view, no options are populated. I am using FXML for my view and populate in my controller as shown below:

<SettingsPane fx:id="settingsPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" searchBoxVisible="true" titleFilter="Application" BorderPane.alignment="CENTER">
@FXML
public SettingsPane settingsPane;
final Option<BooleanProperty> wifiOption = new DefaultOption<>(MaterialDesignIcon.WIFI.graphic(),
            "WiFi", "Set Wifi or Wire", "Devices", model.cameraEnableImageEnhancement, true);

final Option parentOption = new DefaultOption("Parent", "Press to access subcategory", null);
parentOption.getChildren().add(wifiOption);
settingsPane.getOptions().add(parentOption);

final Option<BooleanProperty> demoMode = new DefaultOption<>(MaterialDesignIcon.DATE_RANGE.graphic(),
                "Demo Mode", "Run in local demonstration mode", null, model.showAppLocalDemo(), false);

final Option<StringProperty> appLocation = new DefaultOption<>(MaterialDesignIcon.LOCATION_ON.graphic(),
            "Location", "Installation location", "Application", model.appLocation, true);

final Option<StringProperty> appPosition = new DefaultOption<>(MaterialDesignIcon.BOOKMARK.graphic(),
            "Position", "Position or booth", "Application", model.appPosition, true);

settingsPane.getOptions().addAll(demoMode, appLocation, appPosition, new DefaultOption<>(Option.SEPARATOR), wifiOption);
settingsPane.getOptions().stream().forEach( (Option o) -> System.out.println("Option: " + o.getCaption()) );

screenshot of empty SettingsPane

Help and suggestions are appreciated :)

0

There are 0 best solutions below