|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractListModel | +--users.swing.UserListModel
A ListModel modelling the set or a subset of users managed by a UserManager.
UserManager
,
User
, Serialized FormField Summary | |
protected Comparator |
m_cmpComparator
A Comparator that orders the users. |
protected List |
m_lUsers
A local copy of the list of users to provide easy and consistent access via an index. |
protected UserFilter |
m_ufFilter
A filter that defines the subset of users that are displayed. |
protected UserManager |
m_um
The UserManager that is being modelled. |
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
UserListModel()
Create a new UserListModel modelling the global UserManager. |
|
UserListModel(UserFilter uf,
Comparator cmp)
Create a new UserListModel modelling the global UserManager. |
|
UserListModel(UserManager um)
Create a new UserListModel modelling a given UserManager. |
|
UserListModel(UserManager um,
UserFilter uf,
Comparator cmp)
Create a new UserListModel modelling a given UserManager. |
Method Summary | |
Object |
getElementAt(int nIndex)
Get a user by index. |
int |
getSize()
Return the number of users in the model. |
void |
subscribe()
Subscribe to the UserManager to be informed of any changes in its set of users. |
void |
unsubscribe()
Unsubscribe from the UserManager as there is no need to listen to it anymore, as we are not listened to anymore. |
void |
updateModel()
Update the internal model. |
void |
userAdded(UserDataEvent e)
Respond to the userAdded event by updating the internal model
and forwarding a translated version of the event to anyone who listens to us. |
void |
userDeleted(UserDataEvent e)
Respond to the userDeleted event by updating the internal model
and forwarding a translated version of the event to anyone who listens to us. |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener,
fireContentsChanged,
fireIntervalAdded,
fireIntervalRemoved,
getListeners,
removeListDataListener |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected List m_lUsers
protected Comparator m_cmpComparator
protected UserFilter m_ufFilter
null
no
filtering will occur.protected UserManager m_um
Constructor Detail |
public UserListModel()
public UserListModel(UserFilter uf, Comparator cmp)
uf
- a filter that defines the set of users to be displayed. If null
, no filtering will
occur.cmp
- a Comparator that defines the order of the users to be displayed. The objects to be compared
by this comparator will be Users. If null
, users will be ordered by their names.public UserListModel(UserManager um)
um
- the UserManager to be modelled.public UserListModel(UserManager um, UserFilter uf, Comparator cmp)
um
- the UserManager to be modelled.uf
- a filter that defines the set of users to be displayed. If null
, no filtering will
occur.cmp
- a Comparator that defines the order of the users to be displayed. The objects to be compared
by this comparator will be Users. If null
, users will be ordered by their names.Method Detail |
public int getSize()
public Object getElementAt(int nIndex)
nIndex
- the index of the user to be returned.public void userAdded(UserDataEvent e)
userAdded
event by updating the internal model
and forwarding a translated version of the event to anyone who listens to us.e
- the event object describing the event.public void userDeleted(UserDataEvent e)
userDeleted
event by updating the internal model
and forwarding a translated version of the event to anyone who listens to us.e
- the event object describing the event.public void updateModel()
public void subscribe()
public void unsubscribe()
|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |