NodeScrollEvent
abstract class NodeScrollEvent<N extends Node>
Extends: NodeEvent<N>
Known subtypes: NodeScrollEvent.Pre, NodeScrollEvent.Post
Package: dev.joid.lib.ui.event.impl.node · Module: core · Source: NodeScrollEvent.java
A change of the scroll of a node on one axis, with the offset before and after, in a cancellable Pre and a Post.
Description
Section titled “Description”Node.beforeScroll receives a NodeScrollEvent.Pre and can refuse the scroll; Node.onScroll, Node.onScrollToEnd and Node.onScrollEndReached receive a NodeScrollEvent.Post.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
Axis | getAxis() | Returns the axis that scrolls: HORIZONTAL or VERTICAL. |
double | getOffset() | Returns the offset after the change, in design pixels: 0D at the start of the content, down to minus the scrollable length at its end. |
double | getPrevious() | Returns the offset before the change, in design pixels. |
Method details
Section titled “Method details”getAxis
Section titled “getAxis”Axis getAxis()
Returns the axis that scrolls: HORIZONTAL or VERTICAL.
getOffset
Section titled “getOffset”double getOffset()
Returns the offset after the change, in design pixels: 0D at the start of the content, down to minus the scrollable length at its end.
At onScrollEndReached, the offset that the content reached.
getPrevious
Section titled “getPrevious”double getPrevious()
Returns the offset before the change, in design pixels.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
