title: JavaFX 8 passing Controllers to methods
body: <p>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:</p>
  
  <pre><code>ToolbarViewController toolbarController;
  DesignAreaController designController;
  ...
  public void setToolbarController(ToolbarViewController toolbarController){
      this.toolbarController = toolbarController;       
  }
  </code></pre>
  
  <p>etc. for each controller, is there a way of doing this with one method call? Something like:</p>
  
  <pre><code>public void setController(String id??, ???Controller controller){
      listOfControllers.getControllerById().setController(controller);
  } // This makes no sense of course but illustrates my question
  </code></pre>