|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--InputModel
This class is used to defines the common methods used in the input tables.
Field Summary | |
protected int |
count
The number of species |
protected java.lang.String[] |
names
The names of the species |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
InputModel()
|
Method Summary | |
abstract boolean |
checkInput(javax.swing.JFrame frame)
Each input table model should implements the method to define how the input data should be checked. |
int |
getCount()
Gets the number of the species. |
java.lang.String[] |
getNames()
Gets the names of the species. |
boolean |
isCellEditable(int row,
int col)
Overrides the method in the TableModel class and sets if the cell can be edited. |
abstract void |
saveInputToFile(java.lang.String fileName)
Each input table model should implements the method to define how the input data can be saved. |
java.lang.String |
space(int n)
Generates the specified number of spaces. |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
getColumnCount, getRowCount, getValueAt |
Field Detail |
protected int count
protected java.lang.String[] names
Constructor Detail |
public InputModel()
Method Detail |
public abstract void saveInputToFile(java.lang.String fileName)
fileName
- the name of the file to save input datapublic abstract boolean checkInput(javax.swing.JFrame frame)
true
- if the data do not contain errors
false
- if the data contain any errorspublic boolean isCellEditable(int row, int col)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- the row whose value to be queriedcol
- the column whose value to be queriedpublic java.lang.String[] getNames()
public int getCount()
public java.lang.String space(int n)
n
- the number of spaces
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |