Class JavaFXSafeProxyCreator


  • public class JavaFXSafeProxyCreator
    extends java.lang.Object
    This facility class create a thread-safe proxy for the JavaFX delegate (controller). Thread-safe means that it can be called by any thread and the JavaFX UI related stuff will be safely invoked in the JavaFX UI Thread. It is usually used in this way:
     // This is a Spring bean
     public class JavaFxFooBarPresentation implements FooBarPresentation
       {
         private static final String FXML_URL = "/my/package/javafx/FooBar.fxml";
    Author:
    Fabrizio Giudici
    • Field Detail

      • BEANS

        public static final java.util.Map<java.lang.Class<?>,​java.lang.Object> BEANS
    • Method Detail

      • createNodeAndDelegate

        @Nonnull
        public static <T> JavaFXSafeProxyCreator.NodeAndDelegate createNodeAndDelegate​(@Nonnull
                                                                                       java.lang.Class<?> presentationClass,
                                                                                       @Nonnull
                                                                                       java.lang.String fxmlResourcePath)
        Creates a JavaFXSafeProxyCreator.NodeAndDelegate for the given presentation class.
        Parameters:
        presentationClass - the class of the presentation for which the resources must be created.
        fxmlResourcePath - the path of the FXML resource
      • createSafeProxy

        @Nonnull
        public static <T> T createSafeProxy​(@Nonnull
                                            T target,
                                            java.lang.Class<T> interfaceClass)