Class GearPopulationSelectivityModel
java.lang.Object
javax.swing.table.AbstractTableModel
fr.ifremer.isisfish.ui.input.gear.GearPopulationSelectivityModel
- All Implemented Interfaces:
SensitivityTableModel
,Serializable
,TableCellRenderer
,TableModel
public class GearPopulationSelectivityModel
extends AbstractTableModel
implements TableCellRenderer, SensitivityTableModel
- Version:
- $Revision$ Last update : $Date$ By : $Author$
- Author:
- chatellier
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String[]
Columns names.protected List<Selectivity>
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorDescriptionEmpty constructor.GearPopulationSelectivityModel
(List<Selectivity> selectivities) Constructor with data. -
Method Summary
Modifier and TypeMethodDescriptiongetBeanAtRow
(int rowIndex) Get value at row.Class<?>
getColumnClass
(int columnIndex) int
getColumnName
(int columnIndex) getPropertyAtColumn
(int column) Get property name at column.int
Get selectivity list.getTableCellRendererComponent
(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) getValueAt
(int rowIndex, int columnIndex) boolean
isCellEditable
(int rowIndex, int columnIndex) void
setSelectivities
(List<Selectivity> selectivities) Set target species list.void
setValueAt
(Object value, int rowIndex, int columnIndex) Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
COLUMN_NAMES
Columns names. -
selectivities
-
-
Constructor Details
-
GearPopulationSelectivityModel
public GearPopulationSelectivityModel()Empty constructor. -
GearPopulationSelectivityModel
Constructor with data.- Parameters:
selectivities
- initial selectivities
-
-
Method Details
-
setSelectivities
Set target species list.- Parameters:
selectivities
- the selectivities to set
-
getSelectivities
Get selectivity list.- Returns:
- selectivity list
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCount
in interfaceTableModel
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceTableModel
-
getValueAt
- Specified by:
getValueAt
in interfaceTableModel
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) - Specified by:
getTableCellRendererComponent
in interfaceTableCellRenderer
-
getPropertyAtColumn
Description copied from interface:SensitivityTableModel
Get property name at column.- Specified by:
getPropertyAtColumn
in interfaceSensitivityTableModel
- Parameters:
column
- column- Returns:
- property name at column (can be
null
)
-
getBeanAtRow
Description copied from interface:SensitivityTableModel
Get value at row.- Specified by:
getBeanAtRow
in interfaceSensitivityTableModel
- Parameters:
rowIndex
- row index- Returns:
- value at row/column
-