Package evo.search.view.model
Class FitnessTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- javax.swing.table.DefaultTableModel
-
- evo.search.view.model.FitnessTableModel
-
- All Implemented Interfaces:
Serializable
,TableModel
public class FitnessTableModel extends DefaultTableModel
Table model to display several fitness values.- Author:
- jotoh
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description FitnessTableModel()
Default constructor with default column names.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRow(List<Double> row)
Add a row to the table.void
clear()
Clear the table.Class<?>
getColumnClass(int columnIndex)
Object
getValueAt(int row, int column)
void
setColumnIdentifier(int n, Object identifier)
Set the column name at then
th column.void
setData(List<List<Double>> data)
Setter for the tables fitness values.-
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Method Detail
-
setData
public void setData(List<List<Double>> data)
Setter for the tables fitness values. FiresTableModelEvent
for change.- Parameters:
data
- fitness value to display
-
setColumnIdentifier
public void setColumnIdentifier(int n, Object identifier)
Set the column name at then
th column.- Parameters:
n
- column indexidentifier
- new column name
-
getColumnClass
public Class<?> getColumnClass(int columnIndex)
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
getValueAt
public Object getValueAt(int row, int column)
- Specified by:
getValueAt
in interfaceTableModel
- Overrides:
getValueAt
in classDefaultTableModel
-
clear
public void clear()
Clear the table.
-
-