Class ScrollStartEvent


public class ScrollStartEvent extends TouchEvent
Represents a scroll start event that occurs when a user begins a scrolling gesture on a touch-enabled device.

This event is fired when the user initiates a scrolling motion using touch input. It extends TouchEvent as it is part of the touch interaction lifecycle and is dispatched to registered TouchListener instances for processing. This event is particularly useful on mobile and touch-enabled devices for detecting the beginning of scroll gestures.

Features:

  • Detects the initiation of touch-based scrolling
  • Part of the touch event framework
  • Enables scroll-start animations and behaviors
  • Integrates with the touch event listener pattern

Usage:


 // Create a scroll start event
 ScrollStartEvent event = new ScrollStartEvent();

 // Dispatch to a listener to handle scroll initialization
 event.dispatchTo(myTouchListener);

 // Common use case: disable other interactions during scroll
 public void onEvent(ScrollStartEvent event) {
     disableOtherGestures();
     showScrollIndicator();
 }
 
Since:
2016
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • ScrollStartEvent

      public ScrollStartEvent()
  • Method Details

    • dispatchTo

      public void dispatchTo(TouchListener listener)
      Dispatches this event to the specified listener for processing.

      This method invokes the listener's onEvent method with this event instance, allowing the listener to handle the scroll start event, such as disabling other gestures or showing scroll indicators.

      Specified by:
      dispatchTo in class Event<TouchListener>
      Parameters:
      listener - the listener to which this event should be dispatched