Class ScrollEvent

java.lang.Object
org.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.ScrollEvent
All Implemented Interfaces:
Serializable

public class ScrollEvent extends Event
Represents an event caused by that user is scrolling or has scrolled at the client.
Author:
tomyeh
See Also:
  • Constructor Details

    • ScrollEvent

      public ScrollEvent(String name, Component target, int pos)
      Constructs an scroll-relevant event.
      Parameters:
      pos - the new position
    • ScrollEvent

      public ScrollEvent(String name, Component target, double pos)
      Constructs an scroll-relevant event.
      Parameters:
      pos - the new position
      Since:
      7.0.1
    • ScrollEvent

      public ScrollEvent(String name, Component target, int pos, boolean outBound)
      Constructs an scroll-relevant event.
      Parameters:
      pos - the new position
      outBound - the position is outside the boundary or not (only used on tablet/mobile device)
    • ScrollEvent

      public ScrollEvent(String name, Component target, double dPos, boolean outBound)
      Constructs an scroll-relevant event.
      Parameters:
      dPos - the new position
      outBound - the position is outside the boundary or not (only used on tablet/mobile device)
      Since:
      7.0.1
  • Method Details

    • getScrollEvent

      public static final ScrollEvent getScrollEvent(AuRequest request)
      Converts an AU request to a scroll event.
      Since:
      5.0.0
    • getPos

      public final int getPos()
      Returns the position.
    • getPosInDouble

      public final double getPosInDouble()
      Returns the position.
      Since:
      7.0.1
    • isOutOfBound

      public boolean isOutOfBound()
      Return true if the scroll position is outside of boundary on tablet/mobile device.
      Since:
      6.5.0