public class RunnableBasedDataFxTask extends DataFxTask<java.lang.Void>
Task class.
By doing so it can be used as a basic JavaFX task.
Instances of the class internally hold a Runnable that will be executed.
By doing so developers doesn't need to create an implementation of the Task
class if they want to execute a simple runnable in JavaFX or DataFX context.
Another benefit is the use / support of Lambdas.
The Task class isn't a functional interface and therefore you can't use Lambdas.
By using a Runnable and
wrap it in a RunnableBasedDataFxTask instance a developer can use Lambda expressions.
If the internal Runnable is a DataFxRunnable the TaskStateHandler class will be supported and a handler will be injected in the DataFxRunnable instance. Therefore developers can define title, message, ... for the instance.
cancelablePropertyexceptionProperty, messageProperty, onCancelledProperty, onFailedProperty, onRunningProperty, onScheduledProperty, onSucceededProperty, progressProperty, runningProperty, stateProperty, titleProperty, totalWorkProperty, valueProperty, workDoneProperty| Constructor and Description |
|---|
RunnableBasedDataFxTask(java.lang.Runnable runnable) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Void |
call() |
cancel, cancelableProperty, isCancelable, setCancelable, then, updateTaskMessage, updateTaskProgress, updateTaskProgress, updateTaskTitleaddEventFilter, addEventHandler, buildEventDispatchChain, cancel, cancelled, exceptionProperty, failed, fireEvent, getException, getMessage, getOnCancelled, getOnFailed, getOnRunning, getOnScheduled, getOnSucceeded, getProgress, getState, getTitle, getTotalWork, getValue, getWorkDone, isRunning, messageProperty, onCancelledProperty, onFailedProperty, onRunningProperty, onScheduledProperty, onSucceededProperty, progressProperty, removeEventFilter, removeEventHandler, running, runningProperty, scheduled, setEventHandler, setOnCancelled, setOnFailed, setOnRunning, setOnScheduled, setOnSucceeded, stateProperty, succeeded, titleProperty, totalWorkProperty, updateMessage, updateProgress, updateProgress, updateTitle, updateValue, valueProperty, workDoneProperty