fr.ifremer.coser.ui.control
Class ControlDataTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by fr.ifremer.coser.ui.control.ControlTableModel
          extended by fr.ifremer.coser.ui.control.ControlDataTableModel
All Implemented Interfaces:
Serializable, TableModel

public class ControlDataTableModel
extends ControlTableModel

Table model that display csv content loaded into memory and stored in project storage.

Version:
$Revision$ Last update : $Date$ By : $Author$
Author:
chatellier
See Also:
Serialized Form

Field Summary
protected  CoserConstants.Category category
           
protected  DataStorage data
           
protected  String[] header
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ControlDataTableModel(ControlView controlView, CoserConstants.Category category)
           
 
Method Summary
 CoserConstants.Category getCategory()
          Return category managed by model.
 int getColumnCount()
           
 String getColumnName(int column)
           
 String[] getDataAt(int rowIndex)
          Retourne la donnée (toutes le String[]) à la ligne demandée.
 int getRealIndexOfLine(String lineNumber)
          Retourne l'index dans la liste des données du numero de ligne demandée.
 int getRowCount()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
protected  void updateData(ControlView controlView)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected DataStorage data

category

protected CoserConstants.Category category

header

protected String[] header
Constructor Detail

ControlDataTableModel

public ControlDataTableModel(ControlView controlView,
                             CoserConstants.Category category)
Method Detail

getCategory

public CoserConstants.Category getCategory()
Description copied from class: ControlTableModel
Return category managed by model.

Specified by:
getCategory in class ControlTableModel
Returns:
model category

updateData

protected void updateData(ControlView controlView)

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getColumnName

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

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)

getDataAt

public String[] getDataAt(int rowIndex)
Retourne la donnée (toutes le String[]) à la ligne demandée.

Specified by:
getDataAt in class ControlTableModel
Parameters:
rowIndex -
Returns:
String[]

getRealIndexOfLine

public int getRealIndexOfLine(String lineNumber)
Retourne l'index dans la liste des données du numero de ligne demandée.

Specified by:
getRealIndexOfLine in class ControlTableModel
Parameters:
lineNumber - le numero de données
Returns:
l'index


Copyright © 2010-2012 Ifremer. All Rights Reserved.