public abstract class TableDataAdapter<T>
extends <any>
TableView
.Modifier | Constructor and Description |
---|---|
protected |
TableDataAdapter(Context context,
int columnCount,
java.util.List<T> data)
Creates a new TableDataAdapter.
|
|
TableDataAdapter(Context context,
java.util.List<T> data)
Creates a new TableDataAdapter.
|
|
TableDataAdapter(Context context,
T[] data)
Creates a new TableDataAdapter.
|
protected |
TableDataAdapter(Context context,
TableColumnModel columnModel,
java.util.List<T> data)
Creates a new TableDataAdapter.
|
Modifier and Type | Method and Description |
---|---|
abstract View |
getCellView(int rowIndex,
int columnIndex,
ViewGroup parentView)
Method that gives the cell views for the different table cells.
|
protected int |
getColumnCount()
Gives the column count that is currently used to render the table headers.
|
protected TableColumnModel |
getColumnModel()
Gives the
TableColumnModel that is currently used to render the table headers. |
protected int |
getColumnWeight(int columnIndex)
Gives the column weight (the relative width of a column) of the column at the given index.
|
protected int |
getColumnWeightSum()
Gives the overall column weight (sum of all column weights).
|
Context |
getContext()
Gives the
Context of this adapter. |
java.util.List<T> |
getData()
Gives the data that is set to this adapter.
|
LayoutInflater |
getLayoutInflater()
Gives the
LayoutInflater of this adapter. |
Resources |
getResources()
Gives the
Resources of this adapter. |
T |
getRowData(int rowIndex)
Gives the data object that shall be displayed in the row with the given index.
|
View |
getView(int rowIndex,
View convertView,
ViewGroup parent) |
protected void |
setColumnCount(int columnCount)
Sets the column count which is used to render the table headers.
|
protected void |
setColumnModel(TableColumnModel columnModel)
Sets the
TableColumnModel that will be used to render the table cells. |
protected void |
setColumnWeight(int columnIndex,
int columnWeight)
Sets the column weight (the relative width of a column) of the column at the given index.
|
protected void |
setRowBackgroundProvider(TableDataRowBackgroundProvider<? super T> rowbackgroundProvider)
Sets the
TableDataRowBackgroundProvider that will be used to define the table data rows background. |
public TableDataAdapter(Context context, T[] data)
context
- The context that shall be used.public TableDataAdapter(Context context, java.util.List<T> data)
context
- The context that shall be used.protected TableDataAdapter(Context context, int columnCount, java.util.List<T> data)
context
- The context that shall be used.columnCount
- The number of columns.protected TableDataAdapter(Context context, TableColumnModel columnModel, java.util.List<T> data)
context
- The context that shall be used.columnModel
- The column model to be used.public T getRowData(int rowIndex)
rowIndex
- The index of the row to get the data for.public java.util.List<T> getData()
public Context getContext()
Context
of this adapter. (Hint: use this method in the getHeaderView()
-method
to programmatically initialize new views.)Context
of this adapter.public LayoutInflater getLayoutInflater()
LayoutInflater
of this adapter. (Hint: use this method in the
getHeaderView()
-method to inflate xml-layout-files.)LayoutInflater
of the context of this adapter.public Resources getResources()
Resources
of this adapter. (Hint: use this method in the
getCellView()
-method to resolve resources.)Resources
of the context of this adapter.public abstract View getCellView(int rowIndex, int columnIndex, ViewGroup parentView)
rowIndex
- The index of the row to return the table cell view.columnIndex
- The index of the column to return the table cell view.parentView
- The view to which the returned view will be added.public final View getView(int rowIndex, View convertView, ViewGroup parent)
protected void setRowBackgroundProvider(TableDataRowBackgroundProvider<? super T> rowbackgroundProvider)
TableDataRowBackgroundProvider
that will be used to define the table data rows background.rowbackgroundProvider
- The TableDataRowBackgroundProvider
that shall be used.protected TableColumnModel getColumnModel()
TableColumnModel
that is currently used to render the table headers.protected void setColumnModel(TableColumnModel columnModel)
TableColumnModel
that will be used to render the table cells.columnModel
- The TableColumnModel
that should be set.protected int getColumnCount()
protected void setColumnCount(int columnCount)
columnCount
- The column count that should be set.protected void setColumnWeight(int columnIndex, int columnWeight)
columnIndex
- The index of the column to which this weight should be assigned.columnWeight
- The weight that should be set to the column at the given index.protected int getColumnWeight(int columnIndex)
columnIndex
- The index of the column to receive the column weight.protected int getColumnWeightSum()