Package view.users
Class UsersManagerView
java.lang.Object
view.users.UsersManagerView
The UsersManagerView class is responsible for managing user profile pictures and their associated colors.
It implements the singleton pattern to ensure a single instance.
-
Method Summary
Modifier and TypeMethodDescriptionstatic UsersManagerViewReturns the singleton instance of the UsersManagerView.getUserColor1(int profilePictureIndex) Returns the primary color associated with the specified profile picture index.getUserColor2(int profilePictureIndex) Returns the secondary color associated with the specified profile picture index.getUserPicture(int userPictureIndex) Returns the user profile picture at the specified index.intReturns the total number of user profile pictures.voidLoads user profile pictures from a sprite sheet.
-
Method Details
-
getInstance
Returns the singleton instance of the UsersManagerView.- Returns:
- the singleton instance
-
loadUserPictures
public void loadUserPictures()Loads user profile pictures from a sprite sheet. -
getUserPicture
Returns the user profile picture at the specified index.- Parameters:
userPictureIndex- the index of the user profile picture- Returns:
- the user profile picture
-
getUserPicturesCount
public int getUserPicturesCount()Returns the total number of user profile pictures.- Returns:
- the number of user profile pictures
-
getUserColor1
Returns the primary color associated with the specified profile picture index.- Parameters:
profilePictureIndex- the index of the profile picture- Returns:
- the primary color
-
getUserColor2
Returns the secondary color associated with the specified profile picture index.- Parameters:
profilePictureIndex- the index of the profile picture- Returns:
- the secondary color
-