Task class. This view
manages a list of such tasks and displays each one of them with their
name, progress, and update messages.An optional graphic factory can be set to place a graphic in each row. This allows the user to more easily distinguish between different types of tasks.

TaskProgressView<MyTask> view = new TaskProgressView<>();
view.setGraphicFactory(task -> return new ImageView("db-access.png"));
view.getTasks().add(new MyTask());
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | |
| private final BooleanProperty | |
| private final ObservableList |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final Callback | Returns: the optional graphic factoryReturns the value of |
| public final ObservableList | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final ObjectProperty | Returns: the graphic factory propertyReturns the property used to store an optional callback for creating custom graphics for each task. |
| public final boolean | Returns: boolean determines if tasks will be retainedChecks if tasks will not be removed when succeeded, cancelled or failed. |
| public final BooleanProperty | Returns: BooleanProperty the retainTasks propertyDo not remove tasks when succeeded, cancelled or failed. |
| public final void | setGraphicFactory(Callback<T, Node>
an optional graphic factory factory)Sets the value of |
| public final void | setRetainTasks(boolean
determines if tasks will be retained retainTasks)Do not remove tasks when succeeded, cancelled or failed. |
| graphicFactory | back to summary |
|---|---|
| private ObjectProperty<Callback<T, Node>> graphicFactory | |
| retainTasks | back to summary |
|---|---|
| private final BooleanProperty retainTasks | |
| tasks | back to summary |
|---|---|
| private final ObservableList<T> tasks | |
| TaskProgressView | back to summary |
|---|---|
| public TaskProgressView() Constructs a new task progress view. | |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| getGraphicFactory | back to summary |
|---|---|
| public final Callback Returns the value of | |
| getTasks | back to summary |
|---|---|
| public final ObservableList Returns the list of tasks currently monitored by this view.
| |
| getUserAgentStylesheet | back to summary |
|---|---|
| public String getUserAgentStylesheet() Overrides javafx. Doc from javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls. The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath. Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.
For additional information about using CSS with the scene graph,
see the CSS Reference Guide.
| |
| graphicFactoryProperty | back to summary |
|---|---|
| public final ObjectProperty Returns the property used to store an optional callback for creating custom graphics for each task.
| |
| isRetainTasks | back to summary |
|---|---|
| public final boolean isRetainTasks() Checks if tasks will not be removed when succeeded, cancelled or failed.
| |
| retainTasksProperty | back to summary |
|---|---|
| public final BooleanProperty retainTasksProperty() Do not remove tasks when succeeded, cancelled or failed.
| |
| setGraphicFactory | back to summary |
|---|---|
| public final void setGraphicFactory(Callback<T, Node> factory) Sets the value of | |
| setRetainTasks | back to summary |
|---|---|
| public final void setRetainTasks(boolean retainTasks) Do not remove tasks when succeeded, cancelled or failed.
| |