public class TextTable extends MutableTable<java.lang.String>
rowData
Constructor and Description |
---|
TextTable()
No arg constructor.
|
TextTable(int rows,
int cols)
Construct a text table.
|
TextTable(java.util.Set<java.lang.String> dictionary)
Construct table from a set of strings.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getColumnClass(int columnIndex) |
java.lang.Class |
getDataType()
Returns the datatype (T) for a given table type.
|
(package private) java.lang.String |
getDefaultValue()
Returns the default cell value for a given table type.
|
protected void |
init(int rows,
int cols)
Initialize the table.
|
void |
readData(java.io.File file,
boolean allowRowChanges,
boolean allowColumnChanges)
Load a .csv file.
|
addColumn, addColumns, addColumns, addRow, addRows, addRows, checkData, createNewRow, createNewRow, insertColumn, insertColumn, insertRow, insertRow, modifyRowsColumns, removeColumn, removeColumn, removeRow, removeRow, reset, reset
addTableModelListener, asFlatList, asStringArray, fill, getColumnCount, getColumnName, getLogicalColumnCount, getLogicalValueAt, getRowCount, getValueAt, getXStream, isCellEditable, setColumnHeadings, setDisplayColumnHeadings, setLogicalValue, setValue, setValue, setValueAt, shuffle
public TextTable(int rows, int cols)
rows
- cols
- public TextTable(java.util.Set<java.lang.String> dictionary)
dictionary
- public TextTable()
protected void init(int rows, int cols)
rows
- num rowscols
- num colsjava.lang.String getDefaultValue()
SimbrainDataTable
getDefaultValue
in class SimbrainDataTable<java.lang.String>
public java.lang.Class getDataType()
SimbrainDataTable
getDataType
in class SimbrainDataTable<java.lang.String>
public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class SimbrainDataTable<java.lang.String>
public void readData(java.io.File file, boolean allowRowChanges, boolean allowColumnChanges) throws TableDataException
file
- the CSV fileallowRowChanges
- whether to allow data with a different number of
rowsallowColumnChanges
- whether to allow data with a different number
of columnsTableDataException