Class TapEvent
java.lang.Object
com.oorian.messaging.events.Event<TouchListener>
com.oorian.messaging.events.client.ClientEvent<TouchListener>
com.oorian.messaging.events.client.TouchEvent
com.oorian.messaging.events.client.TapEvent
Represents a tap gesture event that occurs when a user performs a quick touch and release on a touch-enabled device.
This event is fired when the user briefly touches and releases a point on a touch surface, similar to
a click on traditional pointer devices. It extends TouchEvent as it is part of the touch
interaction framework and is dispatched to registered TouchListener instances for processing.
This event is the primary means of selection and activation on touch-enabled interfaces.
Features:
- Detects tap gestures on touch devices
- Part of the touch event framework
- Equivalent to click events on traditional interfaces
- Integrates with the touch event listener pattern
Usage:
// Create a tap event
TapEvent event = new TapEvent();
// Dispatch to a listener to handle tap gestures
event.dispatchTo(myTouchListener);
// Common use case: button activation
public void onEvent(TapEvent event) {
System.out.println("Element tapped");
activateButton();
}
- Since:
- 2016
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(TouchListener listener) Dispatches this event to the specified listener for processing.Methods inherited from class com.oorian.messaging.events.client.TouchEvent
getClientX, getClientY, getIdentifier, getTouchCountMethods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
TapEvent
public TapEvent()
-
-
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 tap gesture, such as activating buttons or selecting items.- Specified by:
dispatchToin classEvent<TouchListener>- Parameters:
listener- the listener to which this event should be dispatched
-