Skip to content

NodeMouseScrollEvent

final class NodeMouseScrollEvent<N extends Node>
Extends: NodeInputEvent<N>
Package: dev.joid.lib.ui.event.impl.node · Module: core · Source: NodeMouseScrollEvent.java

The event of handleMouseScroll on a node, with the position of the pointer and the turn of the wheel.

A node that scrolls its content consumes the wheel while it can still scroll in that direction.

ReturnsSignatureSummary
NodeMouseScrollEvent<N>create(N node, double mouseX, double mouseY, double notchesX, double notchesY, IConsumableEvent source) factoryCreates the event for a node, the position of the pointer and the notches on each axis.

ReturnsSignatureSummary
doublegetMouseX()Returns the horizontal position of the pointer, in design pixels of the UI.
doublegetMouseY()Returns the vertical position of the pointer, in design pixels of the UI.
doublegetNotchesX()Returns the horizontal turn of the wheel or of the touchpad, in notches, fractions included.
doublegetNotchesY()Returns the vertical turn of the wheel, in notches, fractions included: positive when the wheel turns up, negative when it turns down.
Inherited from NodeInputEvent (2)

consume · isConsumed

Inherited from NodeEvent (1)

getNode

<N extends Node> NodeMouseScrollEvent<N> create(N node, double mouseX, double mouseY, double notchesX, double notchesY, IConsumableEvent source) factory

Creates the event for a node, the position of the pointer and the notches on each axis. source is the input that the event belongs to, or null for an input of its own.

double getMouseX()

Returns the horizontal position of the pointer, in design pixels of the UI.

double getMouseY()

Returns the vertical position of the pointer, in design pixels of the UI.

double getNotchesX()

Returns the horizontal turn of the wheel or of the touchpad, in notches, fractions included.

double getNotchesY()

Returns the vertical turn of the wheel, in notches, fractions included: positive when the wheel turns up, negative when it turns down. A scrolling node moves its content by 30 design pixels per notch, times its scrollSpeed.


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