Package View

Class LoginSelectionView

Record Components:
app - The main application instance that manages the login process.
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class LoginSelectionView extends JPanel
The `LoginSelectionView` class represents a graphical user interface component for selecting the type of login, either as an admin or a user. This view provides two buttons for choosing between admin and user login options.
See Also:
  • Field Details

    • adminLoginButton

      private JButton adminLoginButton
      The button for logging in as an admin user. This button allows administrators to log in to the application with administrative privileges.
    • userLoginButton

      private JButton userLoginButton
      The button for logging in as a regular user. This button allows regular users to log in to the application with standard user privileges.
    • app

      protected App app
      The application instance that controls the view. This field holds a reference to the main application instance that manages and controls the user interface.
      See Also:
  • Constructor Details

    • LoginSelectionView

      public LoginSelectionView(App app)
      Creates a view for user selection (Admin or User login).
      Parameters:
      app - The application instance that controls the view. This field holds a reference to the main application instance that manages and controls the user interface. It is used to trigger the appropriate login window based on the user's selection.
  • Method Details

    • openAdminLoginWindow

      private void openAdminLoginWindow()
      Opens the Admin Login window. This method is called when the user clicks on the "Admin Login" button. It triggers the display of the Admin Login window, allowing administrators to log in. The behavior of this method is implemented by invoking the `adminLogin` method on the application instance.
      See Also:
    • openUserLoginWindow

      private void openUserLoginWindow()
      Opens the User Login window. This method is called when the user clicks on the "User Login" button. It triggers the display of the User Login window, allowing customers to log in. The behavior of this method is implemented by invoking the `customerLogin` method on the application instance.
      See Also: