Holger's
Java API

com.antelmann.timeregister
Class WorkUnitTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.antelmann.timeregister.WorkUnitTableModel
All Implemented Interfaces:
Serializable, TableModel

public class WorkUnitTableModel
extends AbstractTableModel

visualizes a list of WorkUnits

Author:
Holger Antelmann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
WorkUnitTableModel()
           
WorkUnitTableModel(Collection<WorkUnit> col)
           
 
Method Summary
 Class<?> getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 List<WorkUnit> getList()
          creates and returns an unmodifiable view of the underlying data
 int getRowCount()
           
 int getRowFor(WorkUnit unit)
           
 Object getValueAt(int row, int column)
           
 WorkUnit getWorkUnitAt(int row)
           
 void update(Collection<WorkUnit> col)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, 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

WorkUnitTableModel

public WorkUnitTableModel()

WorkUnitTableModel

public WorkUnitTableModel(Collection<WorkUnit> col)
Method Detail

update

public void update(Collection<WorkUnit> col)

getList

public List<WorkUnit> getList()
creates and returns an unmodifiable view of the underlying data


getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getColumnClass

public Class<?> getColumnClass(int column)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getValueAt

public Object getValueAt(int row,
                         int column)

getWorkUnitAt

public WorkUnit getWorkUnitAt(int row)

getRowFor

public int getRowFor(WorkUnit unit)


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads