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.
Description
Section titled “Description”A node that scrolls its content consumes the wheel while it can still scroll in that direction.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
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. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Inherited from NodeInputEvent (2)
Creation details
Section titled “Creation details”create
Section titled “create”<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.
Method details
Section titled “Method details”getMouseX
Section titled “getMouseX”double getMouseX()
Returns the horizontal position of the pointer, in design pixels of the UI.
getMouseY
Section titled “getMouseY”double getMouseY()
Returns the vertical position of the pointer, in design pixels of the UI.
getNotchesX
Section titled “getNotchesX”double getNotchesX()
Returns the horizontal turn of the wheel or of the touchpad, in notches, fractions included.
getNotchesY
Section titled “getNotchesY”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
