Package org.testfx.toolkit
Interface ToolkitService
-
- All Known Implementing Classes:
ToolkitServiceImpl
public interface ToolkitServiceInterface that handles setting up anApplication,Stage,Scene, orrootNodeand application cleanup on theJavaFX Application Thread.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.Future<java.lang.Void>cleanupApplication(javafx.application.Application application)CallsApplicationService.stop(Application)on the given application.java.util.concurrent.Future<javafx.application.Application>setupApplication(java.util.function.Supplier<javafx.stage.Stage> stageSupplier, java.lang.Class<? extends javafx.application.Application> applicationClass, java.lang.String... applicationArgs)Creates, initializes, and starts the given applicationClass and returns aFuturewhoseFuture.get()returns the created application.java.util.concurrent.Future<javafx.application.Application>setupApplication(java.util.function.Supplier<javafx.stage.Stage> stageSupplier, java.util.function.Supplier<javafx.application.Application> applicationSupplier, java.lang.String... applicationArgs)Creates, initializes, and starts the supplied application and returns aFuturewhoseFuture.get()returns the created application.java.util.concurrent.Future<java.lang.Void>setupFixture(java.lang.Runnable runnable)Runs the given runnable on theJavaFX Application Thread.<T> java.util.concurrent.Future<T>setupFixture(java.util.concurrent.Callable<T> callable)Runs the given callable on theJavaFX Application Thread.java.util.concurrent.Future<javafx.stage.Stage>setupPrimaryStage(java.util.concurrent.CompletableFuture<javafx.stage.Stage> primaryStageFuture, java.lang.Class<? extends javafx.application.Application> applicationClass, java.lang.String... applicationArgs)If the givenCompletableFuture.isDone(), returns that future; otherwise, launches the given application with its arguments.java.util.concurrent.Future<javafx.scene.Scene>setupScene(javafx.stage.Stage stage, java.util.function.Supplier<? extends javafx.scene.Scene> sceneSupplier)Sets the given scene as the given stage's scene on theJavaFX Application Threadand returns aFuturewhoseFuture.get()returns the given scene.java.util.concurrent.Future<javafx.scene.Parent>setupSceneRoot(javafx.stage.Stage stage, java.util.function.Supplier<? extends javafx.scene.Parent> sceneRootSupplier)Wraps the parent in a scene, sets that scene as the given stage's scene on theJavaFX Application Thread, and returns aFuturewhoseFuture.get()returns the given parent.java.util.concurrent.Future<javafx.stage.Stage>setupStage(javafx.stage.Stage stage, java.util.function.Consumer<javafx.stage.Stage> stageConsumer)Calls the stageConsumer with the given stage on theJavaFX Application Threadand returns aFuturewhoseFuture.get()returns that stage.
-
-
-
Method Detail
-
setupPrimaryStage
java.util.concurrent.Future<javafx.stage.Stage> setupPrimaryStage(java.util.concurrent.CompletableFuture<javafx.stage.Stage> primaryStageFuture, java.lang.Class<? extends javafx.application.Application> applicationClass, java.lang.String... applicationArgs)If the givenCompletableFuture.isDone(), returns that future; otherwise, launches the given application with its arguments.
-
setupFixture
java.util.concurrent.Future<java.lang.Void> setupFixture(java.lang.Runnable runnable)
Runs the given runnable on theJavaFX Application Thread.
-
setupFixture
<T> java.util.concurrent.Future<T> setupFixture(java.util.concurrent.Callable<T> callable)
Runs the given callable on theJavaFX Application Thread.
-
setupStage
java.util.concurrent.Future<javafx.stage.Stage> setupStage(javafx.stage.Stage stage, java.util.function.Consumer<javafx.stage.Stage> stageConsumer)Calls the stageConsumer with the given stage on theJavaFX Application Threadand returns aFuturewhoseFuture.get()returns that stage.
-
setupScene
java.util.concurrent.Future<javafx.scene.Scene> setupScene(javafx.stage.Stage stage, java.util.function.Supplier<? extends javafx.scene.Scene> sceneSupplier)Sets the given scene as the given stage's scene on theJavaFX Application Threadand returns aFuturewhoseFuture.get()returns the given scene.
-
setupSceneRoot
java.util.concurrent.Future<javafx.scene.Parent> setupSceneRoot(javafx.stage.Stage stage, java.util.function.Supplier<? extends javafx.scene.Parent> sceneRootSupplier)Wraps the parent in a scene, sets that scene as the given stage's scene on theJavaFX Application Thread, and returns aFuturewhoseFuture.get()returns the given parent.
-
setupApplication
java.util.concurrent.Future<javafx.application.Application> setupApplication(java.util.function.Supplier<javafx.stage.Stage> stageSupplier, java.lang.Class<? extends javafx.application.Application> applicationClass, java.lang.String... applicationArgs)Creates, initializes, and starts the given applicationClass and returns aFuturewhoseFuture.get()returns the created application.
-
setupApplication
java.util.concurrent.Future<javafx.application.Application> setupApplication(java.util.function.Supplier<javafx.stage.Stage> stageSupplier, java.util.function.Supplier<javafx.application.Application> applicationSupplier, java.lang.String... applicationArgs)Creates, initializes, and starts the supplied application and returns aFuturewhoseFuture.get()returns the created application.
-
cleanupApplication
java.util.concurrent.Future<java.lang.Void> cleanupApplication(javafx.application.Application application)
CallsApplicationService.stop(Application)on the given application.
-
-