Beispiel #1
0
 @Produces
 @EditorTabManagerProducer
 public static EditorTabManager getInstance() {
   if (instance == null) {
     instance = BeanFactory.getInstance().getBean(EditorTabManager.class);
     instance.init();
   }
   return instance;
 }
Beispiel #2
0
    public ImageViewerPane() {
      FXMLLoader loader =
          new FXMLLoader(
              getClass().getResource("/image_view.fxml"),
              null,
              new JavaFXBuilderFactory(),
              type -> BeanFactory.getInstance().getBean(type));
      loader.setRoot(this);
      loader.setController(this);

      try {
        loader.load();
      } catch (IOException e) {
        Dialogs.create()
            .owner(tabPane)
            .title("Bild anzeigen")
            .masthead(null)
            .message("Fehler beim Öffnen eines Bildes.")
            .showException(e);
        logger.error("", e);
      }
    }