Package evo.search.view.model
Class MutatorTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- javax.swing.table.DefaultTableModel
-
- evo.search.view.model.MutatorTableModel
-
- All Implemented Interfaces:
Serializable
,TableModel
public class MutatorTableModel extends DefaultTableModel
This table model displays all registeredDiscreteAlterer
classes to select and configure for theEvolution.run()
method.- 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 MutatorTableModel()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getColumnClass(int columnIndex)
Returns a String class for the first column and a Double class for the rest.int
getColumnCount()
String
getColumnName(int column)
int
getRowByName(String name)
Get the row index for the given name.boolean
isCellEditable(int rowIndex, int columnIndex)
Returns false for the first column.-
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, getRowCount, getValueAt, insertRow, insertRow, 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
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
Returns false for the first column.- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classDefaultTableModel
- Parameters:
rowIndex
- index of the queried row (is ignored)columnIndex
- index of the column- Returns:
false
for the first column,true
for the other columns.
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
- Overrides:
getColumnCount
in classDefaultTableModel
-
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classDefaultTableModel
-
getColumnClass
public Class<?> getColumnClass(int columnIndex)
Returns a String class for the first column and a Double class for the rest.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Returns:
- String/Double class depending on column
-
getRowByName
public int getRowByName(String name)
Get the row index for the given name.- Parameters:
name
- simple name in first column- Returns:
- row index
-
-