Class ScrollStopEvent


public class ScrollStopEvent extends TouchEvent
Represents a scroll stop event that occurs when a user ends a scrolling gesture on a touch-enabled device.

This event is fired when the user completes 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 when scroll gestures have finished.

Features:

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

Usage:


 // Create a scroll stop event
 ScrollStopEvent event = new ScrollStopEvent();

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

 // Common use case: re-enable other interactions after scroll
 public void onEvent(ScrollStopEvent event) {
     enableOtherGestures();
     hideScrollIndicator();
     saveScrollPosition();
 }
 
Since:
2016
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • ScrollStopEvent

      public ScrollStopEvent()
  • 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 stop event, such as re-enabling other gestures or hiding scroll indicators.

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