Enum Class ViewType

java.lang.Object
java.lang.Enum<ViewType>
edu.ntnu.idi.idatt.navigation.ViewType
All Implemented Interfaces:
Serializable, Comparable<ViewType>, Constable

public enum ViewType extends Enum<ViewType>
ViewType.

Enumerates the different types of views or screens that can be displayed within the application. This is used by the ViewNavigator to switch between different parts of the user interface, such as game menus, game boards, and board creators.

See Also:
  • Enum Constant Details

    • GAME_SELECTION

      public static final ViewType GAME_SELECTION
      The main game selection screen where users can choose a game type.
    • LADDER_GAME_MENU

      public static final ViewType LADDER_GAME_MENU
      The menu screen for setting up a Ladder game.
    • LADDER_GAME

      public static final ViewType LADDER_GAME
      The main view for playing a Ladder game.
    • LADDER_GAME_BOARD_CREATOR

      public static final ViewType LADDER_GAME_BOARD_CREATOR
      The view for creating or editing Ladder game boards.
    • LUDO_GAME_MENU

      public static final ViewType LUDO_GAME_MENU
      The menu screen for setting up a Ludo game.
    • LUDO_GAME

      public static final ViewType LUDO_GAME
      The main view for playing a Ludo game.
    • LUDO_GAME_BOARD_CREATOR

      public static final ViewType LUDO_GAME_BOARD_CREATOR
      The view for creating or editing Ludo game boards.
    • GAME_FINISHED

      public static final ViewType GAME_FINISHED
      Represents the view displayed when a game (Ludo or Ladder Game) has finished, showing rankings and options to restart or go to the main menu.
  • Method Details

    • values

      public static ViewType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ViewType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null