|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--bill.util.gui.TableModelCSV
Table model for a JTable that bases it's data on a CSV file.
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
TableModelCSV(CSVParser parser)
Creates a class instance using the specified CSV parser. |
|
| Method Summary | |
int |
getColumnCount()
Determines the number of columns to display in th the JTable by checking how many columns their are in the CSV header. |
String |
getColumnName(int columnIndex)
Determines the name of a particular column by retriving the CSV header line's value for the specified column. |
CSVParser |
getParser()
Retrieves the table model's CSV parser. |
int |
getRowCount()
Determines the number of rows of CSV data we have to display. |
Object |
getValueAt(int rowIndex,
int columnIndex)
Retrieves the value of a particular column for a specific line. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Checks if the specified cell can be editted. |
void |
setParser(CSVParser parser)
Sets the table model's CSV parser. |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
Sets the value of a particular table cell. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TableModelCSV(CSVParser parser)
parser - The CSV parser to base the table model's behavior on.| Method Detail |
public void setParser(CSVParser parser)
parser - The CSV parser to base the table model's behavior on.public CSVParser getParser()
public int getColumnCount()
getColumnCount in class AbstractTableModelpublic String getColumnName(int columnIndex)
getColumnName in class AbstractTableModelcolumnIndex - The 0 based index of the column to retrieve the
name of.public int getRowCount()
getRowCount in class AbstractTableModel
public Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in class AbstractTableModelrowIndex - The 0 based row (line) number to get the value from.columnIndex - The 0 based column number to get from the line.
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in class AbstractTableModelrowIndex - The 0 based row (line) number to check for editability.columnIndex - The 0 based column number to check for editability.
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setValueAt in class AbstractTableModelaValue - The value to set the specified cell to.rowIndex - The 0 based row (line) number to set the value for.columnIndex - The 0 based column number to set for the line.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||