Skip to content

NodeScrollEvent.Pre

final class NodeScrollEvent.Pre<N extends Node>
Extends: NodeScrollEvent<N>
Implements: ICancellableEvent
Package: dev.joid.lib.ui.event.impl.node · Module: core · Source: NodeScrollEvent.java

The event of beforeScroll, which can refuse a scroll of a node.

It fires for a scroll that the wheel, a scrollbar or a call such as scrollTo(...) asks for.

ReturnsSignatureSummary
Pre<N>create(N node, Axis axis, double previous, double offset) factoryCreates the event for a node, the axis, the offset now and the offset asked for.

ReturnsSignatureSummary
voidcancel()Refuses the scroll: the content stays where it is.
booleanisCancelled()If true, a listener refused the scroll.
Inherited from NodeScrollEvent (3)

getAxis · getOffset · getPrevious

Inherited from NodeEvent (1)

getNode

<N extends Node> Pre<N> create(N node, Axis axis, double previous, double offset) factory

Creates the event for a node, the axis, the offset now and the offset asked for.

void cancel()

Refuses the scroll: the content stays where it is. Throws an IllegalStateException in a MONITOR listener.

boolean isCancelled()

If true, a listener refused the scroll.


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

Report a problem with this page