users.swing
Class UserTableModel
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--util.swing.AbstractTableModel
|
+--users.swing.UserTableModel
- public class UserTableModel
- extends AbstractTableModel
- implements UserDataListener, HelpableListener, Serializable
A TableModel
that models the contents of a UserManager
.
- Since:
- v3.0
- Version:
- 3.0 12/06/2001
- Author:
- Thomas Medack
- See Also:
- Serialized Form
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener,
findColumn,
fireTableCellUpdated,
fireTableChanged,
fireTableDataChanged,
fireTableRowsDeleted,
fireTableRowsInserted,
fireTableRowsUpdated,
fireTableStructureChanged,
getListeners,
removeTableModelListener |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
m_umManager
protected UserManager m_umManager
- The UserManager that is being modelled.
m_cmpComparator
protected UserTableModel.UserComparator m_cmpComparator
- The Comparator that defines the sorting order of records in the model. It compares
CatalogItems.
m_lKeys
protected List m_lKeys
- The internal model. A list of the Users' names.
UserTableModel
public UserTableModel(UserManager u,
UserTableModel.UserComparator cmp,
TableEntryDescriptor ted)
- Create a new UserTableModel.
- Parameters:
u
- the UserManager to be modelled.cmp
- a Comparator defining the sort order of the records. If null
, records are ordered
according to the natural ordering of the Users.ted
- a TableEntryDescriptor that can split individual Users into a table's cells.
getRecord
public Object getRecord(int row)
- Get the record at the given index.
- Override:
- Never.
- Parameters:
row
- the index for which to retrieve the record. Element of [0, getRowCount()
).- Returns:
- the
User
to be displayed at the given index. May return null
if
either there is no record at the indicated position or an exception occurs. - Overrides:
- getRecord in class AbstractTableModel
getRowCount
public int getRowCount()
- Get the number of records in this model.
- Override:
- Never.
- Overrides:
- getRowCount in class AbstractTableModel
subscribe
public void subscribe()
- Subscribe as a listener to the model.
- Override:
- Never.
- Specified by:
- subscribe in interface HelpableListener
unsubscribe
public void unsubscribe()
- Un-Subscribe as a listener from the model.
- Override:
- Never.
- Specified by:
- unsubscribe in interface HelpableListener
updateModel
public void updateModel()
- Update the internal model based on the modelled
UserManager
.
- Override:
- Never.
- Specified by:
- updateModel in interface HelpableListener
userAdded
public void userAdded(UserDataEvent e)
- Specified by:
- userAdded in interface UserDataListener
userDeleted
public void userDeleted(UserDataEvent e)
- Specified by:
- userDeleted in interface UserDataListener