1 package tim.prune.load;
3 import javax.swing.table.AbstractTableModel;
6 * Class to hold the table model for the file extract table
8 public class FileExtractTableModel extends AbstractTableModel
11 private int _numRows = 0;
12 private Object[][] _tableData = null;
15 * Get the column count
17 public int getColumnCount()
19 if (_tableData == null)
21 return _tableData[0].length;
25 * Get the name of the column, in this case just the number
27 public String getColumnName(int inColNum)
29 return "" + (inColNum + 1);
35 public int getRowCount()
37 if (_tableData == null)
43 * Get the value of the specified cell
45 public Object getValueAt(int rowIndex, int columnIndex)
47 if (_tableData == null) return "";
48 return _tableData[rowIndex][columnIndex];
52 * Make sure table data is not editable
54 public boolean isCellEditable(int rowIndex, int columnIndex)
61 * @param inData 2-dimensional Object array containing the data
63 public void updateData(Object[][] inData)
66 if (_tableData != null)
68 _numRows = _tableData.length;
70 fireTableStructureChanged();
75 * @return Object array of data
77 public Object[][] getData()