public interface ToolkitService
Application
, Stage
, Scene
, or rootNode
on the
JavaFX Application Thread
as well as cleaning up the application.Modifier and Type | Method and Description |
---|---|
Future<Void> |
cleanupApplication(Application application)
Calls
ApplicationService.stop(Application) on the given application. |
Future<Application> |
setupApplication(Supplier<Stage> stageSupplier,
Class<? extends Application> applicationClass,
String... applicationArgs)
Creates, initializes, and starts the given applicationClass and returns a
Future whose
Future.get() returns the created application. |
Future<Application> |
setupApplication(Supplier<Stage> stageSupplier,
Supplier<Application> applicationSupplier,
String... applicationArgs)
Creates, initializes, and starts the supplied application and returns a
Future whose
Future.get() returns the created application. |
<T> Future<T> |
setupFixture(Callable<T> callable)
Runs the given callable on the
JavaFX Application Thread . |
Future<Void> |
setupFixture(Runnable runnable)
Runs the given runnable on the
JavaFX Application Thread . |
Future<Stage> |
setupPrimaryStage(PrimaryStageFuture primaryStageFuture,
Class<? extends Application> applicationClass,
String... applicationArgs)
If the given
AbstractFuture.isDone() , returns that future; otherwise, launches the given application
with its arguments. |
Future<Scene> |
setupScene(Stage stage,
Supplier<? extends Scene> sceneSupplier)
Sets the given scene as the given stage's scene on the
JavaFX Application Thread and returns a
Future whose Future.get() returns the given scene. |
Future<Parent> |
setupSceneRoot(Stage stage,
Supplier<? extends Parent> sceneRootSupplier)
Wraps the parent in a scene, sets that scene as the given stage's scene on the
JavaFX Application Thread , and returns a Future whose Future.get() returns
the given parent. |
Future<Stage> |
setupStage(Stage stage,
Consumer<Stage> stageConsumer)
Calls the stageConsumer with the given stage on the
JavaFX Application Thread and returns a
Future whose Future.get() returns that stage. |
Future<Stage> setupPrimaryStage(PrimaryStageFuture primaryStageFuture, Class<? extends Application> applicationClass, String... applicationArgs)
AbstractFuture.isDone()
, returns that future; otherwise, launches the given application
with its arguments.Future<Void> setupFixture(Runnable runnable)
JavaFX Application Thread
.<T> Future<T> setupFixture(Callable<T> callable)
JavaFX Application Thread
.Future<Stage> setupStage(Stage stage, Consumer<Stage> stageConsumer)
JavaFX Application Thread
and returns a
Future
whose Future.get()
returns that stage.Future<Scene> setupScene(Stage stage, Supplier<? extends Scene> sceneSupplier)
JavaFX Application Thread
and returns a
Future
whose Future.get()
returns the given scene.Future<Parent> setupSceneRoot(Stage stage, Supplier<? extends Parent> sceneRootSupplier)
JavaFX Application Thread
, and returns a Future
whose Future.get()
returns
the given parent.Future<Application> setupApplication(Supplier<Stage> stageSupplier, Class<? extends Application> applicationClass, String... applicationArgs)
Future
whose
Future.get()
returns the created application.Future<Application> setupApplication(Supplier<Stage> stageSupplier, Supplier<Application> applicationSupplier, String... applicationArgs)
Future
whose
Future.get()
returns the created application.Future<Void> cleanupApplication(Application application)
ApplicationService.stop(Application)
on the given application.