Class CmsScrollToBottomHandler

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.ScrollHandler, com.google.gwt.event.shared.EventHandler

    public class CmsScrollToBottomHandler
    extends java.lang.Object
    implements com.google.gwt.event.dom.client.ScrollHandler
    Scroll handler which executes an action when the user has scrolled to the bottom.

    Since:
    8.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEFAULT_SCROLL_THRESHOLD
      If the lower edge of the content being scrolled is at most this many pixels below the lower edge of the scrolling viewport, the action is triggered.
      protected boolean m_enabled
      An internal flag that, if false, prevents the scroll action from being executed.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsScrollToBottomHandler​(java.lang.Runnable callback)
      Constructs a new scroll handler.
      CmsScrollToBottomHandler​(java.lang.Runnable callback, int scrollThreshold)
      Constructs a new scroll handler with a custom scroll threshold.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onScroll​(com.google.gwt.event.dom.client.ScrollEvent event)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_SCROLL_THRESHOLD

        public static final int DEFAULT_SCROLL_THRESHOLD
        If the lower edge of the content being scrolled is at most this many pixels below the lower edge of the scrolling viewport, the action is triggered.
        See Also:
        Constant Field Values
      • m_enabled

        protected boolean m_enabled
        An internal flag that, if false, prevents the scroll action from being executed.

    • Constructor Detail

      • CmsScrollToBottomHandler

        public CmsScrollToBottomHandler​(java.lang.Runnable callback)
        Constructs a new scroll handler.

        Parameters:
        callback - the action which should be executed when the user scrolls to the bottom.
      • CmsScrollToBottomHandler

        public CmsScrollToBottomHandler​(java.lang.Runnable callback,
                                        int scrollThreshold)
        Constructs a new scroll handler with a custom scroll threshold. The scroll threshold is the distance from the bottom edge of the scrolled content such that when the distance from the bottom edge of the scroll viewport to the bottom edge of the scrolled content becomes lower than the distance, the scroll action is triggered.
        Parameters:
        callback - the action which should be executed when the user scrolls to the bottom.
        scrollThreshold - the scroll threshold
    • Method Detail

      • onScroll

        public void onScroll​(com.google.gwt.event.dom.client.ScrollEvent event)
        Specified by:
        onScroll in interface com.google.gwt.event.dom.client.ScrollHandler
        See Also:
        ScrollHandler.onScroll(com.google.gwt.event.dom.client.ScrollEvent)