Serializable
, Iterable<Iterable<Double>>
, TableModel
public class MultiTable extends AbstractTableModel implements Iterable<Iterable<Double>>
To be displayed in a graphical user interface, this object extends
AbstractTableModel
. Note that the access to the elements in this
object therefore puts both elements together, i.e., the time column is
considered to be the first column in the table.
Modifier and Type | Class | Description |
---|---|---|
class |
MultiTable.Block |
A
MultiTable.Block is a data structure with a two-dimensional double array
of actual data together with identifiers for each column. |
listenerList
Constructor | Description |
---|---|
MultiTable() |
Constructs an empty
MultiTable object. |
MultiTable(double[] timePoints,
double[][] data,
String[] identifiers) |
Constructs a data object for the given values.
|
MultiTable(double[] timePoints,
double[][] data,
String[] columnIdentifiers,
String[] columnNames) |
Modifier and Type | Method | Description |
---|---|---|
void |
addBlock(String[] identifiers) |
Creates a new
MultiTable.Block and adds it to this object. |
MultiTable |
filter(double[] timepoints) |
Creates a multi block table only containing the values for the given timepoints (if available)
|
MultiTable.Block |
getBlock(int index) |
|
int |
getBlockCount() |
|
MultiTable.Block.Column |
getColumn(int column) |
|
MultiTable.Block.Column |
getColumn(String identifier) |
Returns the column corresponding to the given identifier.
|
Class<Double> |
getColumnClass(int columnIndex) |
|
int |
getColumnCount() |
|
String |
getColumnIdentifier(int column) |
|
int |
getColumnIndex(String identifier) |
Returns the index of a column for a given identifier.
|
String |
getColumnName(int column) |
|
String |
getName() |
Gives this
MultiTable 's name. |
int |
getNumBlocks() |
|
int |
getRowCount() |
|
static long |
getSerialversionuid() |
|
String |
getTimeName() |
The column identifier for the first column, i.e., the time column.
|
double |
getTimePoint(int rowIndex) |
Returns the time value at the given index position.
|
double[] |
getTimePoints() |
|
Double |
getValueAt(int rowIndex,
int columnIndex) |
|
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
|
boolean |
isSetTimePoints() |
Checks whether an array of time points has been set for this object.
|
Iterator<Iterable<Double>> |
iterator() |
|
void |
removeBlock(int index) |
Removes the
MultiTable.Block with the given index from this data structure. |
void |
setName(String name) |
Sets the name of this
MultiTable . |
void |
setTimeName(String timeName) |
Set the name of the time column
|
void |
setTimePoints(double[] timePoints) |
|
void |
setValueAt(Double aValue,
int rowIndex,
int columnIndex) |
|
String |
toString() |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
forEach, spliterator
public MultiTable()
MultiTable
object.public MultiTable(double[] timePoints, double[][] data, String[] identifiers)
timePoints
- data
- identifiers
- The first column in identifiers may be the name for the time
column.public static long getSerialversionuid()
public void addBlock(String[] identifiers)
MultiTable.Block
and adds it to this object.
The number of rows will be equal to the number of time points of the
overall data structure.identifiers
- The column identifiers of the new block.public MultiTable filter(double[] timepoints)
timepoints
- public MultiTable.Block getBlock(int index)
index
- public int getBlockCount()
public MultiTable.Block.Column getColumn(int column)
column
- public MultiTable.Block.Column getColumn(String identifier)
identifier
- An identifier.MultiTable.Block.Column
object for this identifier or null if no such
MultiTable.Block.Column
exists.public int getColumnIndex(String identifier)
identifier
- public Class<Double> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnIdentifier(int column)
column
- public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public String getName()
MultiTable
's name.public int getNumBlocks()
public int getRowCount()
getRowCount
in interface TableModel
public String getTimeName()
public double getTimePoint(int rowIndex)
rowIndex
- The index of the time value of interest.public double[] getTimePoints()
public Double getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public boolean isSetTimePoints()
public void removeBlock(int index)
MultiTable.Block
with the given index from this data structure.index
- The index of the block. Do not confuse with the index of the
column.public void setName(String name)
MultiTable
.name
- public void setTimeName(String timeName)
timeName
- the timeName to setpublic void setTimePoints(double[] timePoints)
timePoints
- the timePoints to setpublic void setValueAt(Double aValue, int rowIndex, int columnIndex)
Copyright © 2007–2018. All rights reserved.