Class JWebAssemblyEmulator.JavaFxApplication
- java.lang.Object
-
- javafx.application.Application
-
- de.inetsoftware.jwebassembly.emulator.JWebAssemblyEmulator.JavaFxApplication
-
- Enclosing class:
- JWebAssemblyEmulator
public static class JWebAssemblyEmulator.JavaFxApplication extends javafx.application.Application
The implementation of the javafx Application.
-
-
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
-
Constructor Summary
Constructors Constructor Description JavaFxApplication()
-
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 methodstatic 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 wasmimportsvoid
start(javafx.stage.Stage primaryStage)
-
-
-
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
-
ANNOTATIONS
private static final java.util.Set<ImportAnnotation> ANNOTATIONS
-
-
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 modulemethodName
- the name of the functionargs
- the arguments- Returns:
- the return value if any
-
start
public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception
- Specified by:
start
in classjavafx.application.Application
- Throws:
java.lang.Exception
-
execute
public static void execute()
Load the page and run the start method
-
-