Examples of FXMLComponent


Examples of com.cathive.fx.guice.FXMLComponent

    @Override
    public <T> void hear(TypeLiteral<T> typeLiteral, TypeEncounter<T> typeEncounter) {
        final Class<? super T> rawType = typeLiteral.getRawType();
        if (rawType.isAnnotationPresent(FXMLComponent.class)) {
            final FXMLComponent annotation = rawType.getAnnotation(FXMLComponent.class);
            final FXMLComponentMembersInjector<T> membersInjector = new FXMLComponentMembersInjector<>(injector, annotation);
            typeEncounter.register(membersInjector);
        }
    }
View Full Code Here

Examples of com.cathive.fx.guice.FXMLComponent

    @Override
    public <T> void hear(TypeLiteral<T> typeLiteral, TypeEncounter<T> typeEncounter) {
        final Class<? super T> rawType = typeLiteral.getRawType();
        if (rawType.isAnnotationPresent(FXMLComponent.class)) {
            final FXMLComponent annotation = rawType.getAnnotation(FXMLComponent.class);
            final FXMLComponentMembersInjector<T> membersInjector = new FXMLComponentMembersInjector<>(fxmlLoader, annotation);
            typeEncounter.register(membersInjector);
        }
    }
View Full Code Here

Examples of com.cathive.fx.guice.FXMLComponent

    @Override
    public <T> void hear(TypeLiteral<T> typeLiteral, TypeEncounter<T> typeEncounter) {
        final Class<? super T> rawType = typeLiteral.getRawType();
        if (rawType.isAnnotationPresent(FXMLComponent.class)) {
            final FXMLComponent annotation = rawType.getAnnotation(FXMLComponent.class);
            final FXMLComponentMembersInjector<T> membersInjector = new FXMLComponentMembersInjector<T>(annotation);
            typeEncounter.register(membersInjector);
        }
    }
View Full Code Here

Examples of com.cathive.fx.inject.core.FXMLComponent

        // Fetches the newly created annotated object and it's class.
        final Object target = invocationContext.getTarget();
        final Class<?> targetClass = target.getClass();

        final FXMLComponent annotation = targetClass.getAnnotation(FXMLComponent.class);
        if (annotation == null) {
            throw new IllegalStateException(String.format("No @FXMLComponent annotation could be retrieved from class %s.", targetClass.getName()));
        }
        final FXMLLoader fxmlLoader = new CdiFXMLLoader();
        CdiFXMLLoaderFactory.initializeFXMLLoader(
                fxmlLoader,
                targetClass,
                annotation.location(),
                annotation.resources(),
                annotation.charset());
        fxmlLoader.setRoot(target);
        fxmlLoader.setController(target);
        fxmlLoader.load();

    }
View Full Code Here

Examples of org.jrebirth.af.core.ui.fxml.FXMLComponent

    @Test
    public void loadFXML1() {

        this.model = AbstractTest.globalFacade.getUiFacade().retrieve(TestFXMLModel.class);

        final FXMLComponent comp = FXMLUtils.loadFXML(this.model, "org/jrebirth/core/ui/fxml/Test1.fxml");
        checkFxmlNode(comp.getNode());
    }
View Full Code Here

Examples of org.jrebirth.af.core.ui.fxml.FXMLComponent

    @Test
    public void loadFXML2() {

        this.model = AbstractTest.globalFacade.getUiFacade().retrieve(TestFXMLModel.class);

        final FXMLComponent comp = FXMLUtils.loadFXML(this.model, "Test1.fxml");
        checkFxmlNode(comp.getNode());
    }
View Full Code Here

Examples of org.jrebirth.af.core.ui.fxml.FXMLComponent

    @Test
    public void loadFXML3() {

        this.model = AbstractTest.globalFacade.getUiFacade().retrieve(TestFXMLModel.class);

        final FXMLComponent comp = FXMLUtils.loadFXML(this.model, "org/jrebirth/core/ui/fxml/Test1.fxml", "org.jrebirth.af.core.ui.fxml.Test1");
        checkFxmlNode(comp.getNode());

    }
View Full Code Here

Examples of org.jrebirth.af.core.ui.fxml.FXMLComponent

    @Test
    public void loadFXML4() {

        this.model = AbstractTest.globalFacade.getUiFacade().retrieve(TestFXMLModel.class);

        final FXMLComponent comp = FXMLUtils.loadFXML(this.model, "Test1.fxml", "org.jrebirth.af.core.ui.fxml.Test1");
        checkFxmlNode(comp.getNode());
    }
View Full Code Here

Examples of org.jrebirth.af.core.ui.fxml.FXMLComponent

    /**
     * {@inheritDoc}
     */
    @Override
    protected FXMLComponent buildResource(final FXMLItem fi, final FXMLParams fp) {
        FXMLComponent component = null;
        if (fp instanceof FXML) {
            // Build the requested font
            component = buildFXMLComponent((FXML) fp);
        }
        return component;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.