|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--vc.gui.common.handling.GenericTableModel
HistoryTableModel is the model(pattern) class for the GUI classes that show the table any kind of way in a generic way. This manages the information about anything that is to be shown. For example this is used to show both versions and files in different tables. It has a standerdized interface for presinting the information to the GUI classes.
Field Summary | |
protected java.lang.String[] |
columnNames
Column names of the heading string for the table |
protected java.util.Vector |
data
Vector holding a rows of data as vectors with each inner vector represents a row of data |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
GenericTableModel(java.lang.String[] columnNames,
java.util.Vector data)
Construct the model object from the column names and the table data passed as the parameters |
Method Summary | |
void |
deleteAllRows()
Deletes all the rows from the table |
void |
deleteRow(int index)
Deletes a row from the table at a particular index |
void |
deleteRows(int[] indexes)
Deletes multiple rows from the table at particular indexes |
java.lang.Class |
getColumnClass(int c)
Gets the class of the object at a particular column in the table |
int |
getColumnCount()
Gets the number of columns in the table |
java.lang.String |
getColumnName(int col)
Gets the name of column at a particular index in the table |
java.util.Vector |
getData()
Gets the data in the form of vector of vectors where each inner vercot representing a row of data for the table |
java.lang.Object |
getRow(int index)
Gets the data of a row in the table at a particular index |
int |
getRowCount()
Gets the number of rows in the table |
java.lang.Object |
getValueAt(int row,
int col)
Gets the value of a particular cell in the table |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String[] columnNames
protected java.util.Vector data
Constructor Detail |
public GenericTableModel(java.lang.String[] columnNames, java.util.Vector data)
Method Detail |
public java.util.Vector getData()
public int getColumnCount()
getColumnCount
in class javax.swing.table.AbstractTableModel
public int getRowCount()
getRowCount
in class javax.swing.table.AbstractTableModel
public java.lang.String getColumnName(int col)
getColumnName
in class javax.swing.table.AbstractTableModel
index
- of the column whose name is to be returnedpublic java.lang.Object getValueAt(int row, int col)
getValueAt
in class javax.swing.table.AbstractTableModel
row
- row index of the cell in the table whose valueme is to be returnedcol
- column index of the cell in the table whose valueme is to be returnedpublic java.lang.Class getColumnClass(int c)
getColumnClass
in class javax.swing.table.AbstractTableModel
index
- of the column data whose class is to be returnedpublic java.lang.Object getRow(int index)
index
- of the row whose data is to be returnedpublic void deleteRow(int index)
index
- of the row which is to be deleted from the rowpublic void deleteRows(int[] indexes)
indexes
- of the rows which are to be deleted from the rowpublic void deleteAllRows()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |