Package ActiverseEngine
Class ActiverseMouseInfo
java.lang.Object
ActiverseEngine.ActiverseMouseInfo
- All Implemented Interfaces:
MouseListener
,EventListener
Provides utility methods to retrieve information about the mouse pointer location
and detect mouse clicks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActiverseMouseInfo
createInstance
(Component component) Creates a new instance of the ActiverseMouseInfo class with the specified component.static Point
Retrieves the current location of the mouse pointer on the screen.static boolean
Checks if the left mouse button is clicked.static boolean
Checks if the right mouse button is clicked.void
Not in use method (built on in the future)void
To be built in the futurevoid
void
Detects if a mouse button is pressed.void
Detects if a mouse button is released.
-
Method Details
-
createInstance
Creates a new instance of the ActiverseMouseInfo class with the specified component.- Parameters:
component
-- Returns:
-
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
Not in use method (built on in the future)- Specified by:
mouseClicked
in interfaceMouseListener
- Parameters:
e
-
-
mousePressed
Detects if a mouse button is pressed.- Specified by:
mousePressed
in interfaceMouseListener
- Parameters:
e
-
-
mouseReleased
Detects if a mouse button is released. Limitations for this method are greater than mousePressed- Specified by:
mouseReleased
in interfaceMouseListener
- Parameters:
e
-
-
mouseEntered
To be built in the future- Specified by:
mouseEntered
in interfaceMouseListener
- Parameters:
e
-
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-