Class ScrollEvent


public class ScrollEvent extends ScrollbarEvent
Event fired when the user scrolls an element's content.

This event provides the current scroll position and total scrollable dimensions of the element.

  • Constructor Details

    • ScrollEvent

      public ScrollEvent(Float scrollTop, Float scrollBottom, Float scrollHeight, Float scrollLeft, Float scrollRight, Float scrollWidth)
      Creates a ScrollEvent with the specified scroll positions.
      Parameters:
      scrollTop - the distance scrolled from the top, in pixels
      scrollBottom - the distance from the bottom of the scrollable area, in pixels
      scrollHeight - the total scrollable height, in pixels
      scrollLeft - the distance scrolled from the left, in pixels
      scrollRight - the distance from the right of the scrollable area, in pixels
      scrollWidth - the total scrollable width, in pixels
  • Method Details

    • dispatchTo

      public void dispatchTo(ScrollListener listener)
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Specified by:
      dispatchTo in class Event<ScrollListener>
      Parameters:
      listener - the listener to dispatch this event to