Class MenuController

java.lang.Object
controller.classes.MenuController
All Implemented Interfaces:
InputMethods

public class MenuController extends Object implements InputMethods
Controller for handling the user interaction with the main menu.
  • Constructor Details

    • MenuController

      public MenuController(MenuModel menuModel, MenuView menuView)
      Constructs a new MenuController.
      Parameters:
      menuModel - the model for the menu
  • Method Details

    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Handles mouse click events. Overrides mouseClicked method from InputMethods interface.
      Specified by:
      mouseClicked in interface InputMethods
      Parameters:
      e - the MouseEvent to handle
    • mousePressed

      public void mousePressed(MouseEvent e)
      Handles mouse press events. Overrides mousePressed method from InputMethods interface.
      Specified by:
      mousePressed in interface InputMethods
      Parameters:
      e - the MouseEvent to handle
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Handles mouse release events. Overrides mouseReleased method from InputMethods interface.
      Specified by:
      mouseReleased in interface InputMethods
      Parameters:
      e - the MouseEvent to handle
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Handles mouse move events. Overrides mouseMoved method from InputMethods interface.
      Specified by:
      mouseMoved in interface InputMethods
      Parameters:
      e - the MouseEvent to handle
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Handles mouse drag events. Overrides mouseDragged method from InputMethods interface.
      Specified by:
      mouseDragged in interface InputMethods
      Parameters:
      e - the MouseEvent to handle
    • keyPressed

      public void keyPressed(KeyEvent e)
      Handles key press events. Overrides keyPressed method from InputMethods interface.
      Specified by:
      keyPressed in interface InputMethods
      Parameters:
      e - the KeyEvent to handle
    • keyReleased

      public void keyReleased(KeyEvent e)
      Handles key release events. Overrides keyReleased method from InputMethods interface.
      Specified by:
      keyReleased in interface InputMethods
      Parameters:
      e - the KeyEvent to handle