use of org.monarchinitiative.loinc2hpo.controller.MainController in project loinc2hpo by monarch-initiative.
the class Main method init.
@Override
public void init() throws IOException {
final Injector injector = Guice.createInjector(new DepInjectionModule());
final Callback<Class<?>, Object> guiceFactory = clazz -> injector.getInstance(clazz);
rootNode = FXMLLoader.load(getClass().getResource("/fxml/main.fxml"), // The resource bundle, useful to internationalised apps. Null here.
null, new JavaFXBuilderFactory(), // this Guice factory will manage the instantiation of the controllers and their dependency injections.
guiceFactory);
// the following two lines both works; not sure what the first line is
// mainController = injector.getInstance(Key.get(MainController.class));
mainController = injector.getInstance(MainController.class);
}
Aggregations