Class ActiverseMouseInfo

java.lang.Object
ActiverseEngine.ActiverseMouseInfo
All Implemented Interfaces:
MouseListener, EventListener

public class ActiverseMouseInfo extends Object implements MouseListener
Provides utility methods to retrieve information about the mouse pointer location and detect mouse clicks.
Version:
1.3.2
Author:
Knivier
  • Method Details

    • createInstance

      public static ActiverseMouseInfo createInstance(Component component)
      Creates a new instance of the ActiverseMouseInfo class with the specified component.
      Parameters:
      component - Core component
      Returns:
      Returns the instance of the current mouse info
    • getMouseLocation

      public static Point getMouseLocation()
      Retrieves the current location of the mouse pointer on the screen.
      Returns:
      A Point object representing the coordinates of the mouse pointer.
    • isLeftClick

      public static boolean isLeftClick()
      Checks if the left mouse button is clicked.
      Returns:
      true if the left mouse button is clicked, false otherwise.
    • isRightClick

      public static boolean isRightClick()
      Checks if the right mouse button is clicked.
      Returns:
      true if the right mouse button is clicked, false otherwise.
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Not in use method (built on in the future)
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      e - Mouse event
    • mousePressed

      public void mousePressed(MouseEvent e)
      Detects if a mouse button is pressed.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      e - The event if a mouse is pressed
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Detects if a mouse button is released. Limitations for this method are greater than mousePressed
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      e - The event when mouse is released
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      To be built in the future
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - Mouse Event, later implementated
    • mouseExited

      public void mouseExited(MouseEvent e)
      Specified by:
      mouseExited in interface MouseListener