Class OpenJfxProxyApplication

java.lang.Object
javafx.application.Application
app.supernaut.fx.internal.OpenJfxProxyApplication

public final class OpenJfxProxyApplication extends javafx.application.Application
Internal Supernaut.fx implementation of Application. As a static proxy object for ApplicationDelegate, it delegates OpenJFX Application lifecycle calls to ApplicationDelegate and makes it more independent of OpenJFX.

Tagline: We subclass Application so you don't have to.

To create a Supernaut.fx app, write a class that implements ApplicationDelegate.

  • Nested Class Summary

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

    javafx.application.Application.Parameters
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static FxLauncher
    Launcher must set this global before calling constructor

    Fields inherited from class javafx.application.Application

    STYLESHEET_CASPIAN, STYLESHEET_MODENA
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a JavaFX application that wraps an ApplicationDelegate Note that FxLauncher.createAppDelegate(Application) will wait on the background app initialized latch so this constructor will block until the background app is created and initialized.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Supernaut.fx implementation of Application.init().
    void
    start(javafx.stage.Stage primaryStage)
    Supernaut.fx implementation of Application.start(javafx.stage.Stage).
    void
    SupernautFX implementation of Application#stop().

    Methods inherited from class javafx.application.Application

    getHostServices, getParameters, getUserAgentStylesheet, launch, launch, notifyPreloader, setUserAgentStylesheet

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • init

      public void init() throws Exception
      Supernaut.fx implementation of Application.init(). Initializes the ApplicationContext and loads and dependency injects the Application singleton. Called on the JavaFX-launcher thread
      Overrides:
      init in class javafx.application.Application
      Throws:
      Exception - if something goes wrong
    • start

      public void start(javafx.stage.Stage primaryStage) throws Exception
      Supernaut.fx implementation of Application.start(javafx.stage.Stage). Calls the application's implementation of ApplicationDelegate.start(javafx.stage.Stage)
      Specified by:
      start in class javafx.application.Application
      Parameters:
      primaryStage - The primary Stage for the application
      Throws:
      Exception - if something goes wrong
    • stop

      public void stop() throws Exception
      SupernautFX implementation of Application#stop(). Stops the SupernautFxApp and then stops the Micronaut ApplicationContext
      Overrides:
      stop in class javafx.application.Application
      Throws:
      Exception - if something goes wrong