Module is.codion.swing.common.model
Class AbstractFilteredModelRefresher<T>
java.lang.Object
is.codion.common.model.FilteredModel.AbstractRefresher<T>
is.codion.swing.common.model.component.AbstractFilteredModelRefresher<T>
- Type Parameters:
T
- the model row type
- All Implemented Interfaces:
FilteredModel.Refresher<T>
A default swing based
FilteredModel.Refresher
.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractFilteredModelRefresher
(Supplier<Collection<T>> itemSupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
refreshAsync
(Consumer<Collection<T>> afterRefresh) Performes an async refreshprotected final void
refreshSync
(Consumer<Collection<T>> afterRefresh) Performs a sync refreshprotected final boolean
Methods inherited from class is.codion.common.model.FilteredModel.AbstractRefresher
addRefreshFailedListener, addRefreshListener, asyncRefresh, itemSupplier, observer, processResult, refresh, refreshEvent, refreshFailedEvent, refreshThen, removeRefreshFailedListener, removeRefreshListener, setRefreshing
-
Constructor Details
-
AbstractFilteredModelRefresher
- Parameters:
itemSupplier
- the item supplier
-
-
Method Details
-
supportsAsyncRefresh
protected final boolean supportsAsyncRefresh()- Specified by:
supportsAsyncRefresh
in classFilteredModel.AbstractRefresher<T>
- Returns:
- true if we're running on a thread which supports async refresh, such as a UI or application thread
-
refreshAsync
Description copied from class:FilteredModel.AbstractRefresher
Performes an async refresh- Specified by:
refreshAsync
in classFilteredModel.AbstractRefresher<T>
- Parameters:
afterRefresh
- if specified will be called after a successful refresh
-
refreshSync
Description copied from class:FilteredModel.AbstractRefresher
Performs a sync refresh- Specified by:
refreshSync
in classFilteredModel.AbstractRefresher<T>
- Parameters:
afterRefresh
- if specified will be called after a successful refresh
-