Package org.minifx.fxcommons
Class FxOneShootActionService
- java.lang.Object
-
- javafx.concurrent.Service<java.lang.Void>
-
- org.minifx.fxcommons.FxOneShootActionService
-
- All Implemented Interfaces:
javafx.concurrent.Worker<java.lang.Void>,javafx.event.EventTarget
public final class FxOneShootActionService extends javafx.concurrent.Service<java.lang.Void>JavaFxServicethat executes the specifiedRunnableafter the timeout. This is one shoot action. To reset and reuse theService, callService.restart(). The specified action will run on the JavaFx thread by usingPlatform.runLater(Runnable).
-
-
Constructor Summary
Constructors Constructor Description FxOneShootActionService(java.lang.Runnable action, java.time.Duration timeout)Create aFxOneShootActionServicethat executes the specifiedRunnableon the JavaFx thread after the timeout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javafx.concurrent.Task<java.lang.Void>createTask()-
Methods inherited from class javafx.concurrent.Service
addEventFilter, addEventHandler, buildEventDispatchChain, cancel, cancelled, exceptionProperty, executeTask, executorProperty, failed, fireEvent, getException, getExecutor, getMessage, getOnCancelled, getOnFailed, getOnReady, getOnRunning, getOnScheduled, getOnSucceeded, getProgress, getState, getTitle, getTotalWork, getValue, getWorkDone, isRunning, messageProperty, onCancelledProperty, onFailedProperty, onReadyProperty, onRunningProperty, onScheduledProperty, onSucceededProperty, progressProperty, ready, removeEventFilter, removeEventHandler, reset, restart, running, runningProperty, scheduled, setEventHandler, setExecutor, setOnCancelled, setOnFailed, setOnReady, setOnRunning, setOnScheduled, setOnSucceeded, start, stateProperty, succeeded, titleProperty, totalWorkProperty, valueProperty, workDoneProperty
-
-
-
-
Constructor Detail
-
FxOneShootActionService
public FxOneShootActionService(java.lang.Runnable action, java.time.Duration timeout)Create aFxOneShootActionServicethat executes the specifiedRunnableon the JavaFx thread after the timeout.- Parameters:
action- the runnable to run as the actiontimeout- the time to wait before the action is run
-
-