Skip to content

IHoverElement

interface IHoverElement
Known subtypes: PositionedHoverElement
Package: dev.joid.lib.ui.node.hover · Module: core · Source: IHoverElement.java

A tooltip element that draws itself while its node is hovered.

Add one with Node.hover; NodeHoverElement and CustomHoverElement place an element at the mouse, on the node or at a fixed point. A lambda gives render only: it gets the pointer position and draws where it chooses, in the coordinates of the canvas.

ReturnsSignatureSummary
voidrender(Node node, double mouseX, double mouseY) abstractDraws the element for the hovered node, with the mouse at this point of the canvas.
doublegetX() defaultHorizontal offset of the element from its position.
doublegetY() defaultVertical offset of the element from its position.
doublegetWidth() defaultWidth of the element; with a height, it keeps the element inside the window.
doublegetHeight() defaultHeight of the element; with a width, it keeps the element inside the window.
ReturnsSignatureSummary
voiddetach() hook defaultCalled when the element is removed or its node leaves the UI.

void render(Node node, double mouseX, double mouseY) abstract

Draws the element for the hovered node, with the mouse at this point of the canvas.

double getX() default

Horizontal offset of the element from its position.

double getY() default

Vertical offset of the element from its position.

double getWidth() default

Width of the element; with a height, it keeps the element inside the window.

double getHeight() default

Height of the element; with a width, it keeps the element inside the window.

void detach() hook default

Called when the element is removed or its node leaves the UI.


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