fr.ifremer.isisfish.ui.input.gear
Class GearPopulationSelectivityModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by fr.ifremer.isisfish.ui.input.gear.GearPopulationSelectivityModel
All Implemented Interfaces:
SensitivityTableModel, Serializable, TableCellRenderer, TableModel

public class GearPopulationSelectivityModel
extends AbstractTableModel
implements TableCellRenderer, SensitivityTableModel

Table model for Gear#Selectivity. Columns :

  • selectivity population name
  • selectivity equation
  • Version:
    $Revision: 3124 $ Last update : $Date: 2010-11-29 19:14:09 +0100 (lun., 29 nov. 2010) $ By : $Author: chatellier $
    Author:
    chatellier
    See Also:
    Serialized Form

    Field Summary
    static String[] COLUMN_NAMES
              Columns names.
    protected  List<Selectivity> selectivities
               
     
    Fields inherited from class javax.swing.table.AbstractTableModel
    listenerList
     
    Constructor Summary
    GearPopulationSelectivityModel()
              Empty constructor.
    GearPopulationSelectivityModel(List<Selectivity> selectivities)
              Constructor with data.
     
    Method Summary
     Object getBeanAtRow(int rowIndex)
              Get value at row.
     Class<?> getColumnClass(int columnIndex)
               
     int getColumnCount()
               
     String getColumnName(int columnIndex)
               
     String getPropertyAtColumn(int column)
              Get property name at column.
     int getRowCount()
               
     List<Selectivity> getSelectivities()
              Get selectivity list.
     Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
               
     Object 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
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    COLUMN_NAMES

    public static final String[] COLUMN_NAMES
    Columns names.


    selectivities

    protected List<Selectivity> selectivities
    Constructor Detail

    GearPopulationSelectivityModel

    public GearPopulationSelectivityModel()
    Empty constructor.


    GearPopulationSelectivityModel

    public GearPopulationSelectivityModel(List<Selectivity> selectivities)
    Constructor with data.

    Parameters:
    selectivities - initial selectivities
    Method Detail

    setSelectivities

    public void setSelectivities(List<Selectivity> selectivities)
    Set target species list.

    Parameters:
    selectivities - the selectivities to set

    getSelectivities

    public List<Selectivity> getSelectivities()
    Get selectivity list.

    Returns:
    selectivity list

    getColumnCount

    public int getColumnCount()
    Specified by:
    getColumnCount in interface TableModel

    getRowCount

    public int getRowCount()
    Specified by:
    getRowCount in interface TableModel

    getValueAt

    public Object getValueAt(int rowIndex,
                             int columnIndex)
    Specified by:
    getValueAt in interface TableModel

    getColumnClass

    public Class<?> getColumnClass(int columnIndex)
    Specified by:
    getColumnClass in interface TableModel
    Overrides:
    getColumnClass in class AbstractTableModel

    getColumnName

    public String getColumnName(int columnIndex)
    Specified by:
    getColumnName in interface TableModel
    Overrides:
    getColumnName in class AbstractTableModel

    isCellEditable

    public boolean isCellEditable(int rowIndex,
                                  int columnIndex)
    Specified by:
    isCellEditable in interface TableModel
    Overrides:
    isCellEditable in class AbstractTableModel

    setValueAt

    public void setValueAt(Object value,
                           int rowIndex,
                           int columnIndex)
    Specified by:
    setValueAt in interface TableModel
    Overrides:
    setValueAt in class AbstractTableModel

    getTableCellRendererComponent

    public Component getTableCellRendererComponent(JTable table,
                                                   Object value,
                                                   boolean isSelected,
                                                   boolean hasFocus,
                                                   int row,
                                                   int column)
    Specified by:
    getTableCellRendererComponent in interface TableCellRenderer

    getPropertyAtColumn

    public String getPropertyAtColumn(int column)
    Description copied from interface: SensitivityTableModel
    Get property name at column.

    Specified by:
    getPropertyAtColumn in interface SensitivityTableModel
    Parameters:
    column - column
    Returns:
    property name at column (can be null)

    getBeanAtRow

    public Object getBeanAtRow(int rowIndex)
    Description copied from interface: SensitivityTableModel
    Get value at row.

    Specified by:
    getBeanAtRow in interface SensitivityTableModel
    Parameters:
    rowIndex - row index
    Returns:
    value at row/column


    Copyright © 1999-2011 CodeLutin. All Rights Reserved.