Class MouseUpEvent
java.lang.Object
com.oorian.messaging.events.Event<MouseClickListener>
com.oorian.messaging.events.client.ClientEvent<MouseClickListener>
com.oorian.messaging.events.client.MouseEvent
com.oorian.messaging.events.client.MouseUpEvent
Represents a mouse button release (up) event that occurs when a user releases a pressed mouse button.
This event is fired when the user releases a mouse button that was previously pressed while over
an element. It extends MouseEvent to inherit coordinate tracking capabilities and is
dispatched to registered MouseListener instances for processing. This event completes
the mouse interaction lifecycle that begins with MouseDownEvent.
Features:
- Captures mouse button release with client coordinates
- Inherits X and Y coordinate tracking from MouseEvent
- Part of the mouse interaction lifecycle (down, move, up)
- Integrates with the mouse event listener pattern
Usage:
// Create a mouse up event at coordinates (180, 220)
MouseUpEvent event = new MouseUpEvent(180, 220);
// Access inherited coordinate getters
int x = event.getClientX(); // Returns 180
int y = event.getClientY(); // Returns 220
// Dispatch to a listener
event.dispatchTo(myMouseListener);
- Since:
- 2016
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMouseUpEvent(int clientX, int clientY) Constructs a new MouseUpEvent with the specified client coordinates. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(MouseClickListener listener) Dispatches this event to the specified listener for processing.Methods inherited from class com.oorian.messaging.events.client.MouseEvent
getClientX, getClientYMethods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
MouseUpEvent
public MouseUpEvent(int clientX, int clientY) Constructs a new MouseUpEvent with the specified client coordinates.- Parameters:
clientX- the X coordinate of the mouse pointer relative to the client viewportclientY- the Y coordinate of the mouse pointer relative to the client viewport
-
-
Method Details
-
dispatchTo
Dispatches this event to the specified listener for processing.This method invokes the listener's
onEventmethod with this event instance, allowing the listener to handle the mouse button release event.- Specified by:
dispatchToin classEvent<MouseClickListener>- Parameters:
listener- the listener to which this event should be dispatched
-