T - the data type of records in the listpublic abstract class AbstractDataProvider<T> extends java.lang.Object implements ProvidesKey<T>
HasData implementations.| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractDataProvider()Construct an AbstractDataProvider without a key provider. | 
| protected  | AbstractDataProvider(ProvidesKey<T> keyProvider)Construct an AbstractDataProvider with a given key provider. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addDataDisplay(HasData<T> display)Adds a data display to this adapter. | 
| java.util.Set<HasData<T>> | getDataDisplays()Get the set of displays currently assigned to this adapter. | 
| java.lang.Object | getKey(T item)Get the key for a list item. | 
| ProvidesKey<T> | getKeyProvider()Get the  ProvidesKeythat provides keys for list items. | 
| Range[] | getRanges()Get the current ranges of all displays. | 
| protected abstract void | onRangeChanged(HasData<T> display)Called when a display changes its range of interest. | 
| void | removeDataDisplay(HasData<T> display)Remove the given data display. | 
| protected void | updateRowCount(int count,
              boolean exact)Inform the displays of the total number of items that are available. | 
| protected void | updateRowData(HasData<T> display,
             int start,
             java.util.List<T> values)Informs a single display of new data. | 
| protected void | updateRowData(int start,
             java.util.List<T> values)Inform the displays of the new data. | 
protected AbstractDataProvider()
protected AbstractDataProvider(ProvidesKey<T> keyProvider)
keyProvider - a ProvidesKey objectpublic void addDataDisplay(HasData<T> display)
display - a HasData.public java.util.Set<HasData<T>> getDataDisplays()
HasDatapublic java.lang.Object getKey(T item)
getKey in interface ProvidesKey<T>item - the list itempublic ProvidesKey<T> getKeyProvider()
ProvidesKey that provides keys for list items.ProvidesKeypublic Range[] getRanges()
public void removeDataDisplay(HasData<T> display)
display - a HasData instancejava.lang.IllegalStateException - if the display is not presentprotected abstract void onRangeChanged(HasData<T> display)
display - the display whose range has changedprotected void updateRowCount(int count,
                              boolean exact)
count - the new total row countexact - true if the count is exact, false if it is an estimateprotected void updateRowData(int start,
                             java.util.List<T> values)
start - the start indexvalues - the data values