fr.ifremer.isisfish.ui.input.model
Class MetierSeasonInfoTargetSpeciesTableModel

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

public class MetierSeasonInfoTargetSpeciesTableModel
extends AbstractTableModel
implements TableCellRenderer, SensitivityTableModel

Table model for MetierSeasonInfo#TargetSpecies. Columns :

  • target species name
  • target species equation
  • target species primaryCatch
  • Version:
    $Revision: 3276 $ Last update : $Date: 2011-04-20 17:36:48 +0200 (Wed, 20 Apr 2011) $ By : $Author: chatellier $
    Author:
    chatellier
    See Also:
    Serialized Form

    Field Summary
    static String[] COLUMN_NAMES
              Columns names.
    protected  List<TargetSpecies> targetSpeciesList
               
     
    Fields inherited from class javax.swing.table.AbstractTableModel
    listenerList
     
    Constructor Summary
    MetierSeasonInfoTargetSpeciesTableModel()
              Empty constructor.
    MetierSeasonInfoTargetSpeciesTableModel(List<TargetSpecies> targetSpeciesList)
              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()
               
     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 setTargetSpecies(List<TargetSpecies> targetSpeciesList)
              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.


    targetSpeciesList

    protected List<TargetSpecies> targetSpeciesList
    Constructor Detail

    MetierSeasonInfoTargetSpeciesTableModel

    public MetierSeasonInfoTargetSpeciesTableModel()
    Empty constructor.


    MetierSeasonInfoTargetSpeciesTableModel

    public MetierSeasonInfoTargetSpeciesTableModel(List<TargetSpecies> targetSpeciesList)
    Constructor with data.

    Parameters:
    targetSpeciesList - initial target species
    Method Detail

    setTargetSpecies

    public void setTargetSpecies(List<TargetSpecies> targetSpeciesList)
    Set target species list.

    Parameters:
    targetSpeciesList - the targetSpecies to set

    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-2012 CodeLutin. All Rights Reserved.