Class ScrollbarEvent
java.lang.Object
com.oorian.messaging.events.Event<ScrollListener>
com.oorian.messaging.events.client.ClientEvent<ScrollListener>
com.oorian.messaging.events.client.ScrollbarEvent
- Direct Known Subclasses:
ScrollEndEvent,ScrollEvent
Abstract base class for scroll-related events that carry scroll position information.
Scroll events provide the current scroll position in all four directions, along with the total scrollable dimensions of the element.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the distance from the bottom of the scrollable area.intReturns the total scrollable height.intReturns the distance scrolled from the left.intReturns the distance from the right of the scrollable area.intReturns the distance scrolled from the top.intReturns the total scrollable width.Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTargetMethods inherited from class com.oorian.messaging.events.Event
bubbles, dispatchTo
-
Constructor Details
-
ScrollbarEvent
public ScrollbarEvent(Float scrollTop, Float scrollBottom, Float scrollHeight, Float scrollLeft, Float scrollRight, Float scrollWidth) Creates a ScrollbarEvent with the specified scroll positions.- Parameters:
scrollTop- the distance scrolled from the top, in pixelsscrollBottom- the distance from the bottom of the scrollable area, in pixelsscrollHeight- the total scrollable height, in pixelsscrollLeft- the distance scrolled from the left, in pixelsscrollRight- the distance from the right of the scrollable area, in pixelsscrollWidth- the total scrollable width, in pixels
-
-
Method Details
-
getScrollTop
public int getScrollTop()Returns the distance scrolled from the top.- Returns:
- the scroll top position in pixels
-
getScrollBottom
public int getScrollBottom()Returns the distance from the bottom of the scrollable area.- Returns:
- the scroll bottom position in pixels
-
getScrollHeight
public int getScrollHeight()Returns the total scrollable height.- Returns:
- the scroll height in pixels
-
getScrollLeft
public int getScrollLeft()Returns the distance scrolled from the left.- Returns:
- the scroll left position in pixels
-
getScrollRight
public int getScrollRight()Returns the distance from the right of the scrollable area.- Returns:
- the scroll right position in pixels
-
getScrollWidth
public int getScrollWidth()Returns the total scrollable width.- Returns:
- the scroll width in pixels
-