com.google.gwt.widgetideas.table.client
Class ReadOnlyTableModel<R>
java.lang.Object
com.google.gwt.widgetideas.table.client.TableModel<R>
com.google.gwt.widgetideas.table.client.ReadOnlyTableModel<R>
- Type Parameters:
R
- the data type of the row values
- All Implemented Interfaces:
- SourceTableModelEvents
public abstract class ReadOnlyTableModel<R>
- extends TableModel<R>
A read-only version of the TableModel
. If any modification methods
are called, an exception is thrown.
Field Summary |
static java.lang.String |
READ_ONLY_ERROR
Error message used when calling a write operation. |
Method Summary |
protected boolean |
onRowInserted(int beforeRow)
Event fired when a row is inserted. |
protected boolean |
onRowRemoved(int row)
Event fired when a row is removed. |
protected boolean |
onSetData(int row,
int cell,
java.lang.Object data)
Event fired when the local data changes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
READ_ONLY_ERROR
public static final java.lang.String READ_ONLY_ERROR
- Error message used when calling a write operation.
- See Also:
- Constant Field Values
ReadOnlyTableModel
public ReadOnlyTableModel()
onRowInserted
protected boolean onRowInserted(int beforeRow)
- Description copied from class:
TableModel
- Event fired when a row is inserted. Returning true will increment the row
count by one.
- Specified by:
onRowInserted
in class TableModel<R>
- Parameters:
beforeRow
- the row index of the new row
- Returns:
- true if the action is successful
onRowRemoved
protected boolean onRowRemoved(int row)
- Description copied from class:
TableModel
- Event fired when a row is removed. Returning true will decrement the row
count by one.
- Specified by:
onRowRemoved
in class TableModel<R>
- Parameters:
row
- the row index of the removed row
- Returns:
- true if the action is successful
onSetData
protected boolean onSetData(int row,
int cell,
java.lang.Object data)
- Description copied from class:
TableModel
- Event fired when the local data changes. Returning true will ensure that
the row count is at least as one greater than the row index.
- Specified by:
onSetData
in class TableModel<R>
- Parameters:
row
- the row indexcell
- the cell indexdata
- the new contents of the cell
- Returns:
- true if the action is successful