|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.widgetideas.table.client.TableModel<R>
R
- the data type of the row valuespublic abstract class TableModel<R>
A class to retrieve row data to be used in a table.
Nested Class Summary | |
---|---|
static interface |
TableModel.Callback<R>
Callback for TableModel . |
static class |
TableModel.ColumnSortInfo
Information about the sort order of a specific column in a table. |
static class |
TableModel.ColumnSortList
An ordered list of sorting info where each entry tells us how to sort a single column. |
static class |
TableModel.Request
A TableModel request. |
static class |
TableModel.Response<R>
A response from the TableModel . |
static class |
TableModel.SerializableResponse<R extends java.io.Serializable>
A response from the TableModel that is serializable, and can by
used over RPC. |
Field Summary | |
---|---|
static int |
ALL_ROWS
Use the ALL_ROWS value in place of the numRows variable when requesting all rows. |
static int |
UNKNOWN_ROW_COUNT
Indicates that the number of rows is unknown, and therefore unbounded. |
Constructor Summary | |
---|---|
TableModel()
|
Method Summary | |
---|---|
void |
addTableModelListener(TableModelListener listener)
Add a new TableModelListener . |
int |
getRowCount()
Return the total number of rows. |
void |
insertRow(int beforeRow)
Insert a row and increment the row count by one. |
protected abstract boolean |
onRowInserted(int beforeRow)
Event fired when a row is inserted. |
protected abstract boolean |
onRowRemoved(int row)
Event fired when a row is removed. |
protected abstract boolean |
onSetData(int row,
int cell,
java.lang.Object data)
Event fired when the local data changes. |
void |
removeRow(int row)
Remove a row and decrement the row count by one. |
void |
removeTableModelListener(TableModelListener listener)
Remove a TableModelListener . |
abstract void |
requestRows(TableModel.Request request,
TableModel.Callback<R> callback)
Generate a TableModel.Response based on a specific TableModel.Request . |
void |
setData(int row,
int cell,
java.lang.Object data)
Set the data in a specific cell. |
void |
setRowCount(int rowCount)
Set the total number of rows. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALL_ROWS
public static final int UNKNOWN_ROW_COUNT
Constructor Detail |
---|
public TableModel()
Method Detail |
---|
public void addTableModelListener(TableModelListener listener)
TableModelListener
.
addTableModelListener
in interface SourceTableModelEvents
listener
- the listenerpublic int getRowCount()
UNKNOWN_ROW_COUNT
.
UNKNOWN_ROW_COUNT
public void insertRow(int beforeRow)
beforeRow
- the row index of the new rowpublic void removeRow(int row)
row
- the row index of the removed rowpublic void removeTableModelListener(TableModelListener listener)
TableModelListener
.
removeTableModelListener
in interface SourceTableModelEvents
listener
- the listener to removepublic abstract void requestRows(TableModel.Request request, TableModel.Callback<R> callback)
TableModel.Response
based on a specific TableModel.Request
. The
response is passed into the TableModel.Callback
.
request
- the TableModel.Request
for row datacallback
- the TableModel.Callback
to use for the TableModel.Response
public void setData(int row, int cell, java.lang.Object data)
row
- the row indexcell
- the cell indexdata
- the new contents of the cellpublic void setRowCount(int rowCount)
rowCount
- the row countprotected abstract boolean onRowInserted(int beforeRow)
beforeRow
- the row index of the new row
protected abstract boolean onRowRemoved(int row)
row
- the row index of the removed row
protected abstract boolean onSetData(int row, int cell, java.lang.Object data)
row
- the row indexcell
- the cell indexdata
- the new contents of the cell
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |