Package view.users

Class UsersManagerView

java.lang.Object
view.users.UsersManagerView

public class UsersManagerView extends Object
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 Details

    • getInstance

      public static UsersManagerView 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

      public BufferedImage getUserPicture(int userPictureIndex)
      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

      public Color getUserColor1(int profilePictureIndex)
      Returns the primary color associated with the specified profile picture index.
      Parameters:
      profilePictureIndex - the index of the profile picture
      Returns:
      the primary color
    • getUserColor2

      public Color getUserColor2(int profilePictureIndex)
      Returns the secondary color associated with the specified profile picture index.
      Parameters:
      profilePictureIndex - the index of the profile picture
      Returns:
      the secondary color