org.simoes.lpd.ui
Class PrintJobTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.simoes.lpd.ui.PrintJobTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class PrintJobTableModel
extends javax.swing.table.AbstractTableModel

Represents the data our UI will show. It wraps around the PrintQueue data store. Thus, setPrintQueueDataModel() must be called before this TableModel is used by the View.

Author:
Chris Simoes
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
PrintJobTableModel()
          Default Construtor.
 
Method Summary
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int column)
           
 int removeAllRows()
          Removes all printJobs in our model.
 void setPrintQueueDataModel(PrintQueue pq)
          This method must be called prior to using this DataModel.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintJobTableModel

public PrintJobTableModel()
Default Construtor.

Method Detail

setPrintQueueDataModel

public void setPrintQueueDataModel(PrintQueue pq)
This method must be called prior to using this DataModel. The data for our Model is really stored in a PrintQueue.

Parameters:
pq - the PrintQueue that holds our real printJob data.

removeAllRows

public int removeAllRows()
Removes all printJobs in our model.

Returns:
the number of rows removed.

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getColumnName

public java.lang.String getColumnName(int column)

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)