Class DefaultTableDataSource
java.lang.Object
ca.phon.query.report.datasource.DefaultTableDataSource
- All Implemented Interfaces:
TableDataSource
Basic implementation of a
TableDataSource. Data
is stored in a list of arrays.-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidappend(DefaultTableDataSource otherTable) voiddeleteRow(int row) Get all rows which match the given key values for the given key columns.intNumber of columns (not including column header)intgetColumnIndex(String columnName) getColumnTitle(int col) Get the name of the specified columngetDefaultColumnTitle(int col) Object[]getRow(int row) intNumber of rows (not including column header)getValueAt(int[] keyCols, String[] rowKey, String colName) getValueAt(int[] keyCols, String[] rowKey, String colName, boolean ignoreDiacritics, boolean caseSensitive) getValueAt(int row, int col) Return the value at the given row+col.getValueAt(int row, String columnName) getValueAt(int keyCol, String rowKey, String colName) getValueAt(String rowKey, String colName) Return the value at cell for given rowKey, colName.getValueAt(String keyCol, String rowKey, String colName) Class<?> inferColumnType(int col) Return the type of the first non-null value encountered in the specified column.voidprotected voidsetColumnCount(int columns) voidsetColumnTitle(int col, String title) voidsetValueAt(int[] keyCols, String[] rowKey, String colName, boolean ignoreDiacritics, boolean caseSensitive, Object value) voidsetValueAt(int[] keyCols, String[] rowKey, String colName, Object value) voidsetValueAt(int row, int col, Object newVal) voidsetValueAt(int row, String colname, Object newVal)
-
Constructor Details
-
DefaultTableDataSource
public DefaultTableDataSource() -
DefaultTableDataSource
-
-
Method Details
-
getRowData
-
getRow
-
deleteRow
public void deleteRow(int row) -
insertRow
-
addRow
-
setColumnCount
protected void setColumnCount(int columns) -
getColumnCount
public int getColumnCount()Description copied from interface:TableDataSourceNumber of columns (not including column header)- Specified by:
getColumnCountin interfaceTableDataSource
-
getRowCount
public int getRowCount()Description copied from interface:TableDataSourceNumber of rows (not including column header)- Specified by:
getRowCountin interfaceTableDataSource
-
getColumnIndex
- Specified by:
getColumnIndexin interfaceTableDataSource
-
findRows
-
findRows
-
getValueAt
-
getValueAt
Description copied from interface:TableDataSourceReturn the value at the given row+col.- Specified by:
getValueAtin interfaceTableDataSource- Parameters:
row-col-- Returns:
- the value at the given pos
-
getValueAt
-
getValueAt
-
getValueAt
-
getValueAt
-
getValueAt
-
setValueAt
-
setValueAt
-
setValueAt
-
setValueAt
-
getDefaultColumnTitle
-
getColumnTitle
Description copied from interface:TableDataSourceGet the name of the specified column- Specified by:
getColumnTitlein interfaceTableDataSource- Parameters:
col-- Returns:
- the column title
-
setColumnTitle
-
inferColumnType
Return the type of the first non-null value encountered in the specified column.- Parameters:
col-- Returns:
- class of the first real value in the columm
-
append
-