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
ConstructorsConstructorDescriptionDataProvider(Function<T, String> identifier) DataProvider(Function<T, String> identifier, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbindDisplay(Display<T> display) voidClears the selection for all items.voidvoidClears the selection for all visible items.booleanvoidvoidvoidvoidgotoPage(int page) voidbooleanbooleanvoidonSelect(SelectHandler<T> selectHandler) voidremoveFilter(String id) void(De)selects the specified item and fires a selection event ifselect == true.voidSelects all items ifmultiSelect == true.voidSelects all visible items ifmultiSelect == true.voidsetPageSize(int pageSize) voidvoidReplaces the items, resets the paging and selection and applies the current filter and sort order.voidReplaces 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
-