Skip to content

Admin Menu Controller

217317751JiayeChen edited this page Apr 1, 2024 · 1 revision

AdminMenuController

Controller for the admin menu view.

Author: Jiaye Chen

Fields:

  • home_btn: Button for navigating to the home view.
  • customers_btn: Button for navigating to the customers view.
  • vostok: ImageView for displaying an image.
  • advisors_btn: Button for navigating to the advisors view.
  • logout_btn: Button for logging out.

Initialization Method:

initialize(URL url, ResourceBundle resourceBundle): Method invoked to initialize the controller after its root element has been completely processed. It adds listeners to the buttons and loads an image.

Additional Methods:

addListeners(): Adds event listeners to the buttons to handle navigation to different views and logging out.

onHome(): Action method triggered when the home button is clicked. It sets the selected menu item in the model to "HOME".

onCustomers(): Action method triggered when the customers button is clicked. It sets the selected menu item in the model to "CUSTOMERS".

onClaims(): Action method triggered when the claims button is clicked. It sets the selected menu item in the model to "CLAIMS".

onPolicy(): Action method triggered when the policy button is clicked. It sets the selected menu item in the model to "POLICY".

image(): Loads an image to be displayed in the view.

onLogout(): Action method triggered when the logout button is clicked. It closes the current stage and opens the login window.

Usage Notes:

This class handles the navigation between different admin views and logging out.

Clone this wiki locally