|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.view.client.AbstractDataProvider<T>
T
- the data type of records in the listpublic abstract class AbstractDataProvider<T>
A base implementation of a data source for HasData
implementations.
Constructor Summary | |
---|---|
protected |
AbstractDataProvider()
Construct an AbstractDataProvider without a key provider. |
protected |
AbstractDataProvider(ProvidesKey<T> keyProvider)
Construct an AbstractDataProvider with a given key provider. |
Method Summary | |
---|---|
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 ProvidesKey that 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractDataProvider()
protected AbstractDataProvider(ProvidesKey<T> keyProvider)
keyProvider
- a ProvidesKey
objectMethod Detail |
---|
public void addDataDisplay(HasData<T> display)
display
- a HasData
.public java.util.Set<HasData<T>> getDataDisplays()
HasData
public java.lang.Object getKey(T item)
getKey
in interface ProvidesKey<T>
item
- the list item
public ProvidesKey<T> getKeyProvider()
ProvidesKey
that provides keys for list items.
ProvidesKey
public Range[] getRanges()
public void removeDataDisplay(HasData<T> display)
display
- a HasData
instance
java.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 valuesprotected void updateRowData(HasData<T> display, int start, java.util.List<T> values)
display
- the display to be updatedstart
- the start indexvalues
- the data values
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |