An accordion in my GUI application has quite a few FXML controllers (each controls a single TitledPane). Within the appplication, these controllers need to talk to each other (and I've got that working). But now I want to have something a little more elegant and lean more about JavaxFX in the process. So instead of this:
ToolbarViewController toolbarController;
DesignAreaController designController;
...
public void setToolbarController(ToolbarViewController toolbarController){
this.toolbarController = toolbarController;
}
etc. for each controller, is there a way of doing this with one method call? Something like:
public void setController(String id??, ???Controller controller){
listOfControllers.getControllerById().setController(controller);
} // This makes no sense of course but illustrates my question