cds.gui
Class CSVPartTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bycds.gui.CSVPartTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class CSVPartTableModel
extends javax.swing.table.AbstractTableModel

Table model loading a part of a CSV file

Version:
2.0 June 2003
Author:
Marc Wenger/CDS
See Also:
Serialized Form

Field Summary
private  int cCols
           
private  java.lang.String[] colNames
           
private  int[] colSizes
           
private  int cRows
           
private  java.lang.String[][] data
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
CSVPartTableModel(java.lang.String filename, java.lang.String sep, int beg, int end)
          Constructor
 
Method Summary
 int getColumnCount()
           
 java.lang.String getColumnName(int i)
           
 int getColumnSize(int i)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int col)
           
private  void readData(java.lang.String filename, java.lang.String sep, int indBeg, int indEnd)
           
private  void setEmpty()
           
 
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

cRows

private int cRows

cCols

private int cCols

colNames

private java.lang.String[] colNames

colSizes

private int[] colSizes

data

private java.lang.String[][] data
Constructor Detail

CSVPartTableModel

public CSVPartTableModel(java.lang.String filename,
                         java.lang.String sep,
                         int beg,
                         int end)
Constructor

Parameters:
filename - of a Character Separated Value table
sep - separator
beg - first line to consider
end - last line to consider
Method Detail

setEmpty

private void setEmpty()

readData

private void readData(java.lang.String filename,
                      java.lang.String sep,
                      int indBeg,
                      int indEnd)

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)

getColumnName

public java.lang.String getColumnName(int i)

getColumnSize

public int getColumnSize(int i)

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()