public interface

HasData

implements HasCellPreviewHandlers<T> HasRows
com.google.gwt.view.client.HasData<T>
Known Indirect Subclasses

Class Overview

A view that can display a range of data.

Summary

Public Methods
abstract SelectionModel<? super T> getSelectionModel()
Get the SelectionModel used by this HasData.
abstract T getVisibleItem(int indexOnPage)
Get the row value at the specified visible index.
abstract int getVisibleItemCount()
Get the number of visible items being displayed.
abstract Iterable<T> getVisibleItems()
Get an Iterable composed of all of the visible items.
abstract void setRowData(int start, List<? extends T> values)

Set a values associated with the rows in the visible range.

abstract void setSelectionModel(SelectionModel<? super T> selectionModel)
Set the SelectionModel used by this HasData.
abstract void setVisibleRangeAndClearData(Range range, boolean forceRangeChangeEvent)

Set the visible range and clear the current visible data.

[Expand]
Inherited Methods
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.view.client.HasCellPreviewHandlers
From interface com.google.gwt.view.client.HasRows

Public Methods

public abstract SelectionModel<? super T> getSelectionModel ()

Get the SelectionModel used by this HasData.

Returns

public abstract T getVisibleItem (int indexOnPage)

Get the row value at the specified visible index. Index 0 corresponds to the first item on the page.

Parameters
indexOnPage the index on the page
Returns
  • the row value

public abstract int getVisibleItemCount ()

Get the number of visible items being displayed. Note that this value might be less than the page size if there is not enough data to fill the page.

Returns
  • the number of visible items on the page

public abstract Iterable<T> getVisibleItems ()

Get an Iterable composed of all of the visible items.

Returns

public abstract void setRowData (int start, List<? extends T> values)

Set a values associated with the rows in the visible range.

This method does not replace all rows in the display; it replaces the row values starting at the specified start index through the length of the the specified values. You must call setRowCount(int) to set the total number of rows in the display. You should also use setRowCount(int) to remove rows when the total number of rows decreases.

Parameters
start the start index of the data
values the values within the range

public abstract void setSelectionModel (SelectionModel<? super T> selectionModel)

Set the SelectionModel used by this HasData.

Parameters
selectionModel the SelectionModel

public abstract void setVisibleRangeAndClearData (Range range, boolean forceRangeChangeEvent)

Set the visible range and clear the current visible data.

If the second argument forceRangeChangeEvent is true, a RangeChangeEvent will be fired even if the range does not change. If false, a RangeChangeEvent will only be fired if the range changes.

Parameters
range the new Range
forceRangeChangeEvent true to fire a RangeChangeEvent even if the Range doesn't change