org.mydm.models
Class CollectionTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.mydm.models.CollectionTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class CollectionTableModel
extends javax.swing.table.AbstractTableModel

Collection Table Model for our Collections. Showing the Metadata of the documents. Uses DocHandler to get the list of documents and DocReader to read the XML data and display that as the Metadata.

See Also:
org.docman.ui.CollectionFrame, org.docman.db.DocHandler, org.docman.db.DocReader, Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
CollectionTableModel(java.lang.String colname)
          Constructer
 
Method Summary
 void addRow(EDocument edoc)
          Adds an EDocument Object as a new row
 java.lang.Class getColumnClass(int c)
          Gets the Columns Class
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
          Gets the Columns name
 EDocument[] getEDocuments()
          Gets the EDocument objects stored in this model
 int getRowCount()
           
 java.lang.Object getValueAt(int arg0, int arg1)
           
 boolean isCellEditable(int r, int c)
           
 void removeRow(int rowNo)
           
 void setValueAt(java.lang.Object value, int row, int col)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionTableModel

public CollectionTableModel(java.lang.String colname)
Constructer

Parameters:
colname - collection name.
Method Detail

getColumnName

public java.lang.String getColumnName(int col)
Gets the Columns name

Returns:
column name

getColumnClass

public java.lang.Class getColumnClass(int c)
Gets the Columns Class

Returns:
column class

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

isCellEditable

public boolean isCellEditable(int r,
                              int c)

getValueAt

public java.lang.Object getValueAt(int arg0,
                                   int arg1)

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int col)

addRow

public void addRow(EDocument edoc)
Adds an EDocument Object as a new row

Parameters:
edoc - EDocument

removeRow

public void removeRow(int rowNo)

getEDocuments

public EDocument[] getEDocuments()
Gets the EDocument objects stored in this model

Returns:
Array of EDocument Objects.