public interface ITableContentProvider extends IContentProvider
Table content provider allows access to a structured content in a tabular format. The access is based on cursor model, i.e. the provider allows the client to position itself on a particular row index and provide access to the row data properties via the provider properties. The provider reports total number of rows, current index and whether the currently positioned row is available.
This interface is compatible with DataModel
abstract class
and behaves very similarly.
Modifier and Type | Method and Description |
---|---|
Object |
getCurrentRow()
Returns wrapped current row object.
|
int |
getRowCount()
Return the number of rows of data objects represented by this DataModel.
|
int |
getRowIndex()
Return the zero-relative index of the currently selected row.
|
String |
getRowVariable()
Returns row variable name.
|
boolean |
isRowAvailable()
Return a flag indicating whether there is rowData available at the
current rowIndex.
|
void |
setRowIndex(int rowIndex)
Set the zero-relative index of the currently selected row, or -1 to
indicate that we are not positioned on a row.
|
void |
setRowVariable(String var)
Sets row variable name to use for accessing row specific data.
|
getPropertyKeys, getType, getValue, hasProperty, toString
boolean isRowAvailable()
DataModel.isRowAvailable()
int getRowCount()
Return -1, if the number of rows is unknown, or no wrappedData is available.
DataModel.getRowCount()
int getRowIndex()
If we are not currently positioned on a row, or no wrappedData is available, return -1.
DataModel.getRowIndex()
void setRowIndex(int rowIndex)
DataModel.getRowIndex()
String getRowVariable()
Returns row variable name.
If specified row variable can be used to access current row data for the provider internal needs, like sorting or addressing.
setRowVariable(String)
void setRowVariable(String var)
Sets row variable name to use for accessing row specific data. For
example, if the provider wrapps an array of a data objects with
id
property and the variable name is item
, then
the provider implementation can access id
property of each
record as item.id
.
This property should set only once at the provider initialization time
Object getCurrentRow()
Returns wrapped current row object. Can be null
if not data
is available
isRowAvailable()