Class SwipeRightEvent
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.SwipeRightEvent
Represents a rightward swipe gesture event that occurs when a user swipes from left to right on a touch-enabled device.
This event is fired when the user makes a rapid sliding gesture from left to right across a touch surface.
It extends TouchEvent as it is part of the touch interaction framework and is dispatched to
registered TouchListener instances for processing. This event is commonly used for navigation,
such as moving to the previous item in a carousel or revealing hidden content.
Features:
- Detects rightward swipe gestures on touch devices
- Part of the touch event framework
- Enables directional navigation and interactions
- Integrates with the touch event listener pattern
Usage:
// Create a swipe right event
SwipeRightEvent event = new SwipeRightEvent();
// Dispatch to a listener to handle rightward swipes
event.dispatchTo(myTouchListener);
// Common use case: carousel navigation
public void onEvent(SwipeRightEvent event) {
System.out.println("Swiped right - showing previous item");
showPreviousItem();
}
- 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
-
SwipeRightEvent
public SwipeRightEvent()
-
-
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 rightward swipe gesture, such as navigating to the previous item or revealing content.- Specified by:
dispatchToin classEvent<TouchListener>- Parameters:
listener- the listener to which this event should be dispatched
-