Module fxlauncher
Package fxlauncher

Class DefaultUIProvider

java.lang.Object
fxlauncher.DefaultUIProvider
All Implemented Interfaces:
UIProvider

@AutoService(UIProvider.class) public class DefaultUIProvider extends Object implements UIProvider
  • Constructor Details

    • DefaultUIProvider

      public DefaultUIProvider()
  • Method Details

    • createLoader

      public javafx.scene.Parent createLoader()
      Description copied from interface: UIProvider
      Create the Node that will be displayed while the launcher is loading resources, before the update process starts. The default implementation is an intdeterminate progress indicator, but you can return any arbitrary scene graph.
      Specified by:
      createLoader in interface UIProvider
      Returns:
      The launcher UI
    • createUpdater

      public javafx.scene.Parent createUpdater(FXManifest manifest)
      Description copied from interface: UIProvider
      Create the Node that will be displayed while the launcher is updating resources. This Node should update it's display whenever the UIProvider.updateProgress(double) method is called.
      Specified by:
      createUpdater in interface UIProvider
      Returns:
      The updater Node
      See Also:
    • updateProgress

      public void updateProgress(double progress)
      Description copied from interface: UIProvider
      Called when the update/download progress is changing. The progress is a value between 0 and 1, indicating the completion rate of the update process.
      Specified by:
      updateProgress in interface UIProvider
      Parameters:
      progress - A number between 0 and 1
    • init

      public void init(javafx.stage.Stage stage)
      Description copied from interface: UIProvider
      Initialization method called before UIProvider.createLoader() and UIProvider.createUpdater(FXManifest). This is a good place to add stylesheets and perform other configuration.
      Specified by:
      init in interface UIProvider
      Parameters:
      stage - The stage that will be used to contain the loader and updater.