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.
Description
Section titled “Description”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.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
For subclasses
Section titled “For subclasses”| Returns | Signature | Summary |
|---|---|---|
void | detach() hook default | Called when the element is removed or its node leaves the UI. |
Method details
Section titled “Method details”render
Section titled “render”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.
getWidth
Section titled “getWidth”double getWidth() default
Width of the element; with a height, it keeps the element inside the window.
getHeight
Section titled “getHeight”double getHeight() default
Height of the element; with a width, it keeps the element inside the window.
detach
Section titled “detach”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
