|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.AbstractListModel
org.jbudget.gui.user.UserSelectorModel
public class UserSelectorModel
A list model for selecting a user.
| Field Summary | |
|---|---|
private EventDispatcher.UserListener |
listener
|
private boolean |
showAllUsers
If true not all users are shown and the users are not added to the list when they are added to the DataManager. |
private java.util.List<Pair<java.lang.Integer,java.lang.String>> |
shownUsers
List of displayed users |
private boolean |
wasDisposed
Guard variable |
| Fields inherited from class javax.swing.AbstractListModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
UserSelectorModel()
Creates a new instance of UserSelectorModel. |
|
UserSelectorModel(java.util.List<Pair<java.lang.Integer,java.lang.String>> shownUsers)
Initializes the data model to show only users that are in the given list. |
|
| Method Summary | |
|---|---|
void |
addToList(Pair<java.lang.Integer,java.lang.String> userInfo)
Add a user to the list. |
void |
addToList(org.jbudget.Core.User user)
Add a user to the list. |
void |
dispose()
Frees resources |
void |
finalize()
|
java.lang.Object |
getElementAt(int i)
Returns the element at the appropriate location |
int |
getSize()
Returns the number of available budgets |
private void |
initialize()
Gets a list of available budgets from the DataManager |
void |
removeFromList(Pair<java.lang.Integer,java.lang.String> userInfo)
Add a user to the list. |
void |
removeFromList(org.jbudget.Core.User user)
Add a user to the list. |
| Methods inherited from class javax.swing.AbstractListModel |
|---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.List<Pair<java.lang.Integer,java.lang.String>> shownUsers
private final boolean showAllUsers
private EventDispatcher.UserListener listener
private boolean wasDisposed
| Constructor Detail |
|---|
public UserSelectorModel()
DataManager except for
the system and unknown users.
public UserSelectorModel(java.util.List<Pair<java.lang.Integer,java.lang.String>> shownUsers)
| Method Detail |
|---|
public void addToList(org.jbudget.Core.User user)
public void addToList(Pair<java.lang.Integer,java.lang.String> userInfo)
public void removeFromList(org.jbudget.Core.User user)
public void removeFromList(Pair<java.lang.Integer,java.lang.String> userInfo)
public void dispose()
public void finalize()
finalize in class java.lang.Objectprivate void initialize()
public java.lang.Object getElementAt(int i)
public int getSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||