PagingListView or the
PagingGridTableView. The service delays the actual loading by a couple of milliseconds so that it can be
restarted (cancel and start) when the user changes the page index quickly. This avoids redundant updates and heavy
query operations. The service binds all of its properties to the paging control that uses it.
pageProperty(), pageSizeProperty(), loaderProperty(), loadDelayInMillisProperty()
| Modifier and Type | Field and Description |
|---|---|
| private final LongProperty | |
| private final ObjectProperty | |
| private final IntegerProperty | |
| private final IntegerProperty | |
| public static int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Task | createTask()
Implements abstract javafx. Invoked after the Service is started on the JavaFX Application Thread. |
| public final long | |
| public final Callback | |
| public final int | |
| public final int | |
| public final LongProperty | Returns: the delay before data will actually be loadedThe delay in milliseconds before the loading service will actually try to retrieve the data from (for example) a backend. |
| public final ObjectProperty | |
| public final IntegerProperty | Returns: the number of the currently showing pageThe index of the currently showing page. |
| public final IntegerProperty | Returns: the number of items per pageThe number of items shown per page of the control that is being controlled by the pagination control. |
| public final void |
| loadDelayInMillis | back to summary |
|---|---|
| private final LongProperty loadDelayInMillis | |
| loader | back to summary |
|---|---|
| private final ObjectProperty<Callback<PagingLoadRequest, PagingLoadResponse<T>>> loader | |
| page | back to summary |
|---|---|
| private final IntegerProperty page | |
| pageSize | back to summary |
|---|---|
| private final IntegerProperty pageSize | |
| UNDEFINED | back to summary |
|---|---|
| public static int UNDEFINED | |
| LoadingService | back to summary |
|---|---|
| public LoadingService() | |
| createTask | back to summary |
|---|---|
| protected Task Implements abstract javafx. Doc from javafx. Invoked after the Service is started on the JavaFX Application Thread. Implementations should save off any state into final variables prior to creating the Task, since accessing properties defined on the Service within the background thread code of the Task will result in exceptions. For example:
If the Task is a pre-defined class (as opposed to being an anonymous class), and if it followed the recommended best-practice, then there is no need to save off state prior to constructing the Task since its state is completely provided in its constructor.
| |
| getLoadDelayInMillis | back to summary |
|---|---|
| public final long getLoadDelayInMillis() | |
| getLoader | back to summary |
|---|---|
| public final Callback | |
| getPage | back to summary |
|---|---|
| public final int getPage() | |
| getPageSize | back to summary |
|---|---|
| public final int getPageSize() | |
| loadDelayInMillisProperty | back to summary |
|---|---|
| public final LongProperty loadDelayInMillisProperty() The delay in milliseconds before the loading service will actually try to retrieve the data from (for example) a backend. This delay is around a few hundred milliseconds by default. Delaying the loading has the advantage that sudden property changes will not trigger multiple backend queries but will get batched together in a single reload operation.
| |
| loaderProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| pageProperty | back to summary |
|---|---|
| public final IntegerProperty pageProperty() The index of the currently showing page.
| |
| pageSizeProperty | back to summary |
|---|---|
| public final IntegerProperty pageSizeProperty() The number of items shown per page of the control that is being controlled by the pagination control.
| |
| setLoadDelayInMillis | back to summary |
|---|---|
| public final void setLoadDelayInMillis(long loadDelayInMillis) | |