Class AbstractJavaFXSpringApplication

java.lang.Object
javafx.application.Application
it.tidalwave.ui.javafx.JavaFXApplicationWithSplash
it.tidalwave.ui.javafx.spi.AbstractJavaFXSpringApplication
Direct Known Subclasses:
JavaFXSpringAnnotationApplication, JavaFXSpringApplication

public abstract class AbstractJavaFXSpringApplication extends JavaFXApplicationWithSplash
A base class for all variants of JavaFX applications with Spring.
Author:
Fabrizio Giudici
  • Field Details

  • Constructor Details

    • AbstractJavaFXSpringApplication

      public AbstractJavaFXSpringApplication()
  • Method Details

    • launch

      public static void launch(@Nonnull Class<? extends javafx.application.Application> appClass, @Nonnull AbstractJavaFXSpringApplication.InitParameters initParameters)
      Launches the application.
      Parameters:
      appClass - the class of the application to instantiate
      initParameters - the initialisation parameters
    • params

      @Nonnull protected static AbstractJavaFXSpringApplication.InitParameters params()
      Returns an empty set of parameters. to populate and pass to launch(Class, InitParameters)
      Returns:
      an empty set of parameters
      Since:
      1.1-ALPHA-6
    • createParent

      @Nonnull protected NodeAndDelegate<?> createParent() throws IOException
      Specified by:
      createParent in class JavaFXApplicationWithSplash
      Throws:
      IOException
    • initializeInBackground

      protected void initializeInBackground()
      Specified by:
      initializeInBackground in class JavaFXApplicationWithSplash
    • createApplicationContext

      @Nonnull protected abstract org.springframework.context.ConfigurableApplicationContext createApplicationContext()
      Returns a created application context..
      Returns:
      a created application context.
    • onStageCreated

      protected final void onStageCreated(@Nonnull javafx.stage.Stage stage, @Nonnull NodeAndDelegate<?> applicationNad)
      Overrides:
      onStageCreated in class JavaFXApplicationWithSplash
    • onStageCreated

      protected void onStageCreated(@Nonnull org.springframework.context.ApplicationContext applicationContext)
      Invoked when the Stage is created and the ApplicationContext has been initialized. Typically, the main class overrides this, retrieves a reference to the main controller and boots it. This method is executed in a background thread.
      Parameters:
      applicationContext - the application context
    • onClosing

      protected void onClosing()
      Invoked when the main Stage is being closed.
      Overrides:
      onClosing in class JavaFXApplicationWithSplash