|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
org.salespointframework.desktop.models.UserListModel
org.salespointframework.desktop.models.UserComboBoxModel
public class UserComboBoxModel
A ComboBoxModel modelling a UserManager.
UserManager
,
User
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface org.salespointframework.desktop.models.FilterableModel |
---|
FilterableModel.DefaultModelFilter, FilterableModel.ModelFilter, FilterableModel.ResultCountListener |
Field Summary | |
---|---|
protected User |
m_usrSelection
The currently selected user. |
Fields inherited from class org.salespointframework.desktop.models.UserListModel |
---|
categorize, defaultCategory, m_cmpComparator, m_lUsers, m_ufFilter, m_um, modelFilter, resultCountListeners |
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
UserComboBoxModel()
Create a new UserComboBoxModel modelling the global UserManager. |
|
UserComboBoxModel(UserFilter uf,
java.util.Comparator<User> cmp)
Create a new UserComboBoxModel modelling the global UserManager. |
|
UserComboBoxModel(UserManager um)
Create a new UserComboBoxModel modelling a given UserManager. |
|
UserComboBoxModel(UserManager um,
UserFilter uf,
java.util.Comparator<User> cmp)
Create a new UserComboBoxModel modelling a given UserManager. |
Method Summary | |
---|---|
java.lang.Object |
getSelectedItem()
Return the currently selected user. |
void |
setSelectedItem(java.lang.Object oSelectedItem)
Set the currently selected user, making sure that it is known to the UserManager . |
void |
updateModel()
Update the local model. |
Methods inherited from class org.salespointframework.desktop.models.UserListModel |
---|
addResultCountListener, DatasourceChanged, filterPropertyChanged, fireResultCountChanged, getElementAt, getSize, isFirstInCategory, removeResultCountListener, setModelFilter, subscribe, unsubscribe, userAdded, userDataChanged, userDeleted |
Methods inherited from class javax.swing.AbstractListModel |
---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.ListModel |
---|
addListDataListener, getElementAt, getSize, removeListDataListener |
Field Detail |
---|
protected User m_usrSelection
Constructor Detail |
---|
public UserComboBoxModel()
public UserComboBoxModel(UserFilter uf, java.util.Comparator<User> 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 UserComboBoxModel(UserManager um)
um
- the UserManager to be modelled.public UserComboBoxModel(UserManager um, UserFilter uf, java.util.Comparator<User> 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 java.lang.Object getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
public void setSelectedItem(java.lang.Object oSelectedItem)
UserManager
. If the given User
is not known to the UserManager
,
the selection is not altered.
setSelectedItem
in interface javax.swing.ComboBoxModel
oSelectedItem
- the new selection.public void updateModel()
updateModel
in interface HelpableListener
updateModel
in class UserListModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |