T - the (Java) type of data that will be provided by this DataProviderpublic interface DataProvider<T>
DataReader.
Retrieved data is stored in a Property.
There are three different ways for obtaining the retrieved data:
getData() on the DataProvider. This will return an
ObservableValue containing the data.
setResultProperty(javafx.beans.property.Property). The passed argument is a Property, that
will be set when data is retrieved.
Worker that is retrieving
the data, and observe the Worker.valueProperty()
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.value.ObservableValue<T> |
getData()
A ObservableValue that wraps the provided Data.
|
javafx.concurrent.Worker<T> |
retrieve()
Starts to retrieve the data in a background thread and returns the Worker for
monitoring.
|
void |
setResultProperty(javafx.beans.property.Property<T> result)
Provide an
Property that wraps the to-be-retrieved
data. |
javafx.beans.value.ObservableValue<T> getData()
InvalidationListener or a
ChangeListener to the result of this
method will make sure that you will be notified once data is available.ObservableValue that contains or will
contain the data obtained by this DataProvider.void setResultProperty(javafx.beans.property.Property<T> result)
Property that wraps the to-be-retrieved
data.result - a javafx.beans.property that already exists in the
application, and that will be used by this DataProvider to store the retrieved
data.javafx.concurrent.Worker<T> retrieve()
Worker.valueProperty() property