Holger's
Java API

com.antelmann.mgmt
Class UserTableModel

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

public class UserTableModel
extends AbstractTableModel

encapsulates User objects for use in a JTable.

Author:
Holger Antelmann
See Also:
User, Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
UserTableModel(Collection<? extends User> col)
           
 
Method Summary
 User get(int row)
           
 Class getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 int getRowCount()
           
 Object getValueAt(int row, int column)
           
 void refresh(Collection<? extends User> col)
           
 int rowOf(User user)
          returns either the row or -1 if the user is not found
 void sortColumn(int column)
           
 
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

UserTableModel

public UserTableModel(Collection<? extends User> col)
Method Detail

refresh

public void refresh(Collection<? extends User> col)

get

public User get(int row)

rowOf

public int rowOf(User user)
returns either the row or -1 if the user is not found


getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getColumnName

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

getColumnClass

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

getValueAt

public Object getValueAt(int row,
                         int column)

sortColumn

public void sortColumn(int column)
                throws IndexOutOfBoundsException
Throws:
IndexOutOfBoundsException


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