Package model.overlays
Class MenuUserSelectionOverlayModel
java.lang.Object
model.overlays.MenuOverlayModel
model.overlays.MenuUserSelectionOverlayModel
Represents the menu overlay model used for user selection.
-
Field Summary
Fields inherited from class model.overlays.MenuOverlayModel
menuModel -
Constructor Summary
ConstructorsConstructorDescriptionMenuUserSelectionOverlayModel(MenuModel menuModel) Constructs a MenuUserSelectionOverlayModel with the specified MenuModel. -
Method Summary
Modifier and TypeMethodDescriptionReturns the selected user.getUsers()Returns the list of users.voidsetSelectedUser(User selectedUser) Sets the selected user.voidSets the list of users.voidupdate()Updates the state of the menu overlay.voidUpdates the user list by getting the list of users from the UsersManagerModel and setting the selected user to the first user in the list.
-
Constructor Details
-
MenuUserSelectionOverlayModel
Constructs a MenuUserSelectionOverlayModel with the specified MenuModel.- Parameters:
menuModel- the MenuModel associated with this overlay
-
-
Method Details
-
update
public void update()Updates the state of the menu overlay.This method is not used in this class.
- Specified by:
updatein classMenuOverlayModel
-
updateUserList
public void updateUserList()Updates the user list by getting the list of users from the UsersManagerModel and setting the selected user to the first user in the list. -
getSelectedUser
Returns the selected user.- Returns:
- the selected user
-
setSelectedUser
Sets the selected user.- Parameters:
selectedUser- the user to be selected
-
getUsers
Returns the list of users.- Returns:
- an ArrayList of users
-
setUsers
Sets the list of users.- Parameters:
users- the list of users to be set
-