Class JWebAssemblyEmulator.JavaFxApplication

  • Enclosing class:
    JWebAssemblyEmulator

    public static class JWebAssemblyEmulator.JavaFxApplication
    extends javafx.application.Application
    The implementation of the javafx Application.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javafx.application.Application

        javafx.application.Application.Parameters
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Set<ImportAnnotation> ANNOTATIONS  
      private static java.lang.String content  
      private static java.lang.Throwable error  
      private static java.lang.Runnable main  
      private static javafx.stage.Stage stage  
      private static java.lang.String url  
      private static netscape.javascript.JSObject wasmImports  
      private static javafx.scene.web.WebEngine webEngine  
      • Fields inherited from class javafx.application.Application

        STYLESHEET_CASPIAN, STYLESHEET_MODENA
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void execute()
      Load the page and run the start method
      static java.lang.Object executeScript​(java.lang.String moduleName, java.lang.String methodName, java.lang.Object... args)
      The bridge method for the WebAssembly import function into the JavaScript.
      (package private) static void registerScript​(ImportAnnotation anno)
      register a JavaScript function from a nation method with annotation in the wasmimports
      void start​(javafx.stage.Stage primaryStage)
      • Methods inherited from class javafx.application.Application

        getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • url

        private static java.lang.String url
      • content

        private static java.lang.String content
      • main

        private static java.lang.Runnable main
      • stage

        private static javafx.stage.Stage stage
      • webEngine

        private static javafx.scene.web.WebEngine webEngine
      • wasmImports

        private static netscape.javascript.JSObject wasmImports
      • error

        private static java.lang.Throwable error
    • Constructor Detail

      • JavaFxApplication

        public JavaFxApplication()
    • Method Detail

      • registerScript

        static void registerScript​(@Nonnull
                                   ImportAnnotation anno)
        register a JavaScript function from a nation method with annotation in the wasmimports
        Parameters:
        anno - the annotation
      • executeScript

        public static java.lang.Object executeScript​(java.lang.String moduleName,
                                                     java.lang.String methodName,
                                                     java.lang.Object... args)
        The bridge method for the WebAssembly import function into the JavaScript.
        Parameters:
        moduleName - the name of the module
        methodName - the name of the function
        args - the arguments
        Returns:
        the return value if any
      • start

        public void start​(javafx.stage.Stage primaryStage)
                   throws java.lang.Exception
        Specified by:
        start in class javafx.application.Application
        Throws:
        java.lang.Exception
      • execute

        public static void execute()
        Load the page and run the start method