vc.gui.client.handling
Class HistoryTableModel
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--vc.gui.common.handling.GenericTableModel
|
+--vc.gui.client.handling.HistoryTableModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel
- public class HistoryTableModel
- extends GenericTableModel
HistoryTableModel is the model(pattern) class for the GUI classes that show the
details of versions and labels of files and directories in a table. This manages
the information about the versions and labels of files and directories and it
offers a standerdized interface for presinting the information to the GUI classes.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary |
HistoryTableModel(java.lang.String[] columnNames,
javax.swing.JTable table_History)
Constructs and initializes the object with the data from parameteres and
with the help of super class functionality |
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 |
HistoryTableModel
public HistoryTableModel(java.lang.String[] columnNames,
javax.swing.JTable table_History)
- Constructs and initializes the object with the data from parameteres and
with the help of super class functionality
- Parameters:
columnNames
- Column names or heading of the table contentstable_History
- to initialize the memeber table_History
addHistoryElementsToTable
public void addHistoryElementsToTable(HistoryElement[] history,
boolean append)
- This adds multiple versions and labels to the table and displays them.
- Parameters:
history
- array of different versions and labelsappend
- if true adds these versions and labels after the existing elements
or else removes the existing elements and adds the new ones
updateHistoryElementInTable
public void updateHistoryElementInTable(int index,
HistoryElement historyElement)
- This updates a particular version or label being shown in the table
- Parameters:
index
- index of the version or label in the table that is being updatedhistoryElement
- content of the version or label in the table that is being updated
getSelectedHistoryElements
public HistoryElement[] getSelectedHistoryElements()
- Gets all the versions and labels that are selected from the table.
- Parameters:
Retuns
- an array of HistoryElement where each element represents a
particular version or a label