Class DataProvider<T>
- java.lang.Object
-
- org.jboss.hal.ballroom.dataprovider.DataProvider<T>
-
-
Constructor Summary
Constructors Constructor Description DataProvider(Function<T,String> identifier, boolean multiSelect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDisplay(Display<T> display)voidaddFilter(String name, FilterValue<T> filter)voidclearAllSelection()Clears the selection for all itemsvoidclearFilters()voidclearVisibleSelection()Clears the selection for all visible itemsbooleancontains(T item)Iterable<T>getAllItems()Comparator<T>getComparator()FilterValue<T>getFilter(String name)Iterable<T>getFilteredItems()StringgetId(T item)PageInfogetPageInfo()SelectionInfo<T>getSelectionInfo()Iterable<T>getVisibleItems()voidgotoFirstPage()voidgotoLastPage()voidgotoNextPage()voidgotoPage(int page)voidgotoPreviousPage()booleanhasFilters()booleanisVisible(T item)voidonSelect(SelectHandler<T> selectHandler)voidremoveFilter(String name)voidselect(T item, boolean select)(De)selects the specified item and fires a selection event ifselect == truevoidselectAll()Selects all items if .voidselectVisible()Selects all visible items if .voidsetComparator(Comparator<T> comparator)voidsetPageSize(int pageSize)voidupdate(Iterable<T> items)Replaces the items, resets the paging and selection and applies the current filter and sort order.
-
-
-
Method Detail
-
update
public void update(Iterable<T> items)
Replaces the items, resets the paging and selection and applies the current filter and sort order.
-
contains
public boolean contains(T item)
-
isVisible
public boolean isVisible(T item)
-
onSelect
public void onSelect(SelectHandler<T> selectHandler)
-
selectAll
public void selectAll()
Selects all items if . Does not fire selection events
-
selectVisible
public void selectVisible()
Selects all visible items if . 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
public void select(T item, boolean select)
(De)selects the specified item and fires a selection event ifselect == true
-
getSelectionInfo
public SelectionInfo<T> getSelectionInfo()
-
addFilter
public void addFilter(String name, FilterValue<T> filter)
-
removeFilter
public void removeFilter(String name)
-
clearFilters
public void clearFilters()
-
getFilter
public FilterValue<T> getFilter(String name)
-
hasFilters
public boolean hasFilters()
-
setComparator
public void setComparator(Comparator<T> comparator)
-
getComparator
public Comparator<T> getComparator()
-
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)
-
getPageInfo
public PageInfo getPageInfo()
-
-