Package org.patternfly.dataprovider
Class DataProvider<T>
java.lang.Object
org.patternfly.dataprovider.DataProvider<T>
Holds items and state for components like data lists and tables. Modifications of items and state are reflected in the bound
displays.
-
Constructor Summary
ConstructorDescriptionDataProvider
(Function<T, String> identifier) DataProvider
(Function<T, String> identifier, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
bindDisplay
(Display<T> display) void
Clears the selection for all items.void
void
Clears the selection for all visible items.boolean
void
void
void
void
gotoPage
(int page) void
boolean
boolean
void
onSelect
(SelectHandler<T> selectHandler) void
removeFilter
(String id) void
(De)selects the specified item and fires a selection event ifselect == true
.void
Selects all items ifmultiSelect == true
.void
Selects all visible items ifmultiSelect == true
.void
setPageSize
(int pageSize) void
void
Replaces the items, resets the paging and selection and applies the current filter and sort order.void
Replaces the items, resets the paging and selection and applies the current filter and sort order.
-
Constructor Details
-
DataProvider
-
DataProvider
-
-
Method Details
-
update
Replaces the items, resets the paging and selection and applies the current filter and sort order. -
update
Replaces the items, resets the paging and selection and applies the current filter and sort order. -
contains
-
isVisible
-
getId
-
getItem
-
getIdentifier
-
getAllItems
-
getFilteredItems
-
getVisibleItems
-
onSelect
-
selectAll
public void selectAll()Selects all items ifmultiSelect == true
. Does not fire selection events. -
selectVisible
public void selectVisible()Selects all visible items ifmultiSelect == true
. Does not fire selection events. -
clearAllSelection
public void clearAllSelection()Clears the selection for all items. -
clearVisibleSelection
public void clearVisibleSelection()Clears the selection for all visible items. -
select
(De)selects the specified item and fires a selection event ifselect == true
. -
getSelectionInfo
-
addFilter
-
removeFilter
-
clearFilters
public void clearFilters() -
hasFilters
public boolean hasFilters() -
sort
-
setPageSize
public void setPageSize(int pageSize) -
gotoFirstPage
public void gotoFirstPage() -
gotoPreviousPage
public void gotoPreviousPage() -
gotoNextPage
public void gotoNextPage() -
gotoLastPage
public void gotoLastPage() -
gotoPage
public void gotoPage(int page) -
bindDisplay
-