Java 类javafx.util.BuilderFactory 实例源码

项目:examples-javafx-repos1    文件:OldScoresModule.java   
@Override
protected void configure() {

    String mathRecenteredJSONFile = MATH_RECENTERED_JSON_FILE;
    String verbalRecenteredJSONFile = VERBAL_RECENTERED_JSON_FILE;
    String settingsFileName = SETTINGS_FILE_NAME;

    bind(BuilderFactory.class).to(JavaFXBuilderFactory.class);

    bind(String.class).annotatedWith(Names.named("mathRecenteredJSONFile")).toInstance(mathRecenteredJSONFile);
    bind(String.class).annotatedWith(Names.named("verbalRecenteredJSONFile")).toInstance(verbalRecenteredJSONFile);
    bind(String.class).annotatedWith(Names.named("settingsFileName")).toInstance(settingsFileName);

    bind(SettingsDAO.class).to(SettingsDAOImpl.class).asEagerSingleton();
    bind(RecenteredDAO.class).to(RecenteredDAOImpl.class).asEagerSingleton();

    bindInterceptor(Matchers.subclassesOf(ManagedDataSource.class), Matchers.any(), new ManagedDataSourceInterceptor());
}
项目:examples-javafx-repos1    文件:OldScoresModule.java   
@Override
protected void configure() {

    String mathRecenteredJSONFile = MATH_RECENTERED_JSON_FILE;
    String verbalRecenteredJSONFile = VERBAL_RECENTERED_JSON_FILE;
    String settingsFileName = SETTINGS_FILE_NAME;

    bind(BuilderFactory.class).to(JavaFXBuilderFactory.class);

    bind(String.class).annotatedWith(Names.named("mathRecenteredJSONFile")).toInstance(mathRecenteredJSONFile);
    bind(String.class).annotatedWith(Names.named("verbalRecenteredJSONFile")).toInstance(verbalRecenteredJSONFile);
    bind(String.class).annotatedWith(Names.named("settingsFileName")).toInstance(settingsFileName);

    bind(SettingsDAO.class).to(SettingsDAOImpl.class).asEagerSingleton();
    bind(RecenteredDAO.class).to(RecenteredDAOImpl.class).asEagerSingleton();
}
项目:examples-javafx-repos1    文件:OldScoresModule.java   
@Override
protected void configure() {

    String mathRecenteredJSONFile = MATH_RECENTERED_JSON_FILE;
    String verbalRecenteredJSONFile = VERBAL_RECENTERED_JSON_FILE;
    String settingsFileName = SETTINGS_FILE_NAME;

    bind(BuilderFactory.class).to(JavaFXBuilderFactory.class);

    bind(String.class).annotatedWith(Names.named("mathRecenteredJSONFile")).toInstance(mathRecenteredJSONFile);
    bind(String.class).annotatedWith(Names.named("verbalRecenteredJSONFile")).toInstance(verbalRecenteredJSONFile);
    bind(String.class).annotatedWith(Names.named("settingsFileName")).toInstance(settingsFileName);

    bind(SettingsDAO.class).to(SettingsDAOImpl.class).asEagerSingleton();
    bind(RecenteredDAO.class).to(RecenteredDAOImpl.class).asEagerSingleton();

    bindInterceptor(Matchers.subclassesOf(ManagedDataSource.class), Matchers.any(), new ManagedDataSourceInterceptor());
}
项目:Gargoyle    文件:GargoyleBuilderFactory.java   
public static BuilderFactory getInstance() {

        if (factory == null) {
            factory = new GargoyleBuilderFactory();
        }
        return factory;
    }
项目:examples-javafx-repos1    文件:OldScoresApplication1.java   
@Override
public void start(Stage primaryStage) throws Exception {

    if( logger.isDebugEnabled() ) {
        logger.debug("[START]");
    }

    Injector injector = Guice.createInjector(new OldScoresModule());

    FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml1/MainView.fxml"),
                                       null,
                                       injector.getInstance(BuilderFactory.class),
                                       injector.getInstance(GuiceControllerFactory.class));

    Parent p = loader.load();
    MainViewController mv = loader.getController();

    Scene scene = new Scene( p );

    scene.setOnKeyPressed(evt -> {

        if( evt.getCode().equals(KeyCode.F1) ) {
            try {
                if( logger.isDebugEnabled() ) {
                    logger.debug("[OPEN HELP]");
                }
                mv.openHelpDialog();
            } catch (IOException exc) {
                String msg = "error showing help dialog";
                logger.error(msg);
                Alert alert = new Alert(Alert.AlertType.ERROR, msg);
                alert.showAndWait();
            }
        }
    });

    primaryStage.setTitle("Old Scores");
    primaryStage.setScene(scene);
    primaryStage.show();
}
项目:examples-javafx-repos1    文件:OldScoresApplication2.java   
@Override
public void start(Stage primaryStage) throws Exception {

    if( logger.isDebugEnabled() ) {
        logger.debug("[START]");
    }

    Injector injector = Guice.createInjector(new OldScoresModule());

    FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml2/MainView.fxml"),
                                       null,
                                       injector.getInstance(BuilderFactory.class),
                                       injector.getInstance(GuiceControllerFactory.class));

    Parent p = loader.load();
    MainViewController mv = loader.getController();

    Scene scene = new Scene( p );

    scene.setOnKeyPressed(evt -> {

        if( evt.getCode().equals(KeyCode.F1) ) {
            try {
                if( logger.isDebugEnabled() ) {
                    logger.debug("[OPEN HELP]");
                }
                mv.openHelpDialog();
            } catch (IOException exc) {
                String msg = "error showing help dialog";
                logger.error(msg);
                Alert alert = new Alert(Alert.AlertType.ERROR, msg);
                alert.showAndWait();
            }
        }
    });

    primaryStage.setTitle("Old Scores");
    primaryStage.setScene(scene);
    primaryStage.show();
}
项目:spring-javafx    文件:FXMLComponentConfiguration.java   
@Bean
public FXMLControllerLoader fxmlComponentLoader(@Qualifier("fxmlComponentControllerFactory") Callback<Class<?>, Object> controllerFactory,
                                                @Qualifier("fxmlComponentBuilderFactory") BuilderFactory builderFactory,
                                                @Qualifier("fxmlComponentResourceBundle") ResourceBundle resourceBundle) {
    FXMLControllerLoader fxmlControllerLoader = new FXMLControllerLoader();
    fxmlControllerLoader.setControllerFactory(controllerFactory);
    fxmlControllerLoader.setBuilderFactory(builderFactory);
    fxmlControllerLoader.setResourceBundle(resourceBundle);
    return fxmlControllerLoader;
}
项目:vars    文件:QueryModule.java   
public void configure(Binder binder) {
    binder.install(new VarsJpaModule(annotationPersistenceUnit, knowledgebasePersistenceUnit, miscPersistenceUnit));
    binder.bind(BuilderFactory.class).to(JavaFXBuilderFactory.class);
    binder.bind(AsyncQueryService.class).to(AsyncQueryServiceImpl.class).asEagerSingleton();

    // Fork join pool causes problems in java web start
    //binder.bind(Executor.class).to(ForkJoinPool.class).asEagerSingleton();
    Executor executor = Executors.newCachedThreadPool();
    binder.bind(Executor.class).toInstance(executor);
}
项目:Gargoyle    文件:GargoyleBuilderFactory.java   
public void setBuilderFactory(BuilderFactory factory) {
    this.deligator = factory;
}
项目:examples-javafx-repos1    文件:OldScoresApplication3.java   
@Override
public void start(Stage primaryStage) throws Exception {

    if( logger.isDebugEnabled() ) {
        logger.debug("[START]");
    }

    Injector injector = Guice.createInjector(new OldScoresModule());

    FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml3/MainView.fxml"),
                                       null,
                                       injector.getInstance(BuilderFactory.class),
                                       injector.getInstance(GuiceControllerFactory.class));

    Parent p = loader.load();
    MainViewController mv = loader.getController();

    Scene scene = new Scene( p );

    scene.setOnKeyPressed(evt -> {

        if( evt.getCode().equals(KeyCode.F1) ) {
            try {
                if( logger.isDebugEnabled() ) {
                    logger.debug("[OPEN HELP]");
                }
                injector.getInstance(NavigationDelegate.class).openHelpDialog();

            } catch (Exception exc) {
                String msg = "error showing help dialog";
                logger.error(msg);
                Alert alert = new Alert(Alert.AlertType.ERROR, msg);
                alert.showAndWait();
            }
        }
    });

    primaryStage.setTitle("Old Scores");
    primaryStage.setScene(scene);
    primaryStage.show();
}
项目:spring-javafx    文件:FXMLControllerLoader.java   
public void setBuilderFactory(BuilderFactory builderFactory) {
    this.builderFactory = builderFactory;
}
项目:Gargoyle    文件:GargoyleBuilderFactory.java   
public static BuilderFactory getInstance() {

    if (factory == null) {

        factory = new GargoyleBuilderFactory();

    }
    return factory;
}
项目:Gargoyle    文件:FxLoader.java   
/**
 * 프로그램당 하나의 builder만
 * 
 * @작성자 : KYJ
 * @작성일 : 2017. 12. 23.
 * @param _builderFactory
 */
public static void setBuilderFactory(BuilderFactory _builderFactory) {
    builderFactory = _builderFactory;
}