Interface InputController

    • Method Detail

      • keyPressed

        boolean keyPressed​(KeyEvent e)
        Reacts to key events.
        Parameters:
        e - The key event.
        Returns:
        true, if the event is handled by this InputController.
      • mouseClicked

        boolean mouseClicked​(MouseEvent e)
        Reacts to mouse events.
        Parameters:
        e - The mouse event.
        Returns:
        true, if the event is handled by this InputController.
      • mouseMoved

        boolean mouseMoved​(MouseEvent e)
        Reacts to mouse move events from the gui.
        Parameters:
        e - The mouse event.
        Returns:
        true, if the event is handled by this InputController.
      • getXFactor

        double getXFactor()
        Gets the x scaling factor for transforming mouse event coordinates.
        Returns:
        the xfactor
      • getYFactor

        double getYFactor()
        Gets the y scaling factor for transforming mouse event coordinates.
        Returns:
        the yfactor
      • getArea

        Rectangle getArea()
        Gets the gui area of for transforming mouse event coordinates.
        Returns:
        The area of this InputController.
      • setController

        void setController​(StarpointController controller)
        Sets the reference to the Controller.
        Parameters:
        controller - The Controller.