Package com.cathive.fx.inject.core

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

TOP

Related Classes of com.cathive.fx.inject.core.FXMLComponent

Copyright © 2018 www.massapicom. 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.