WindowUIBridge
class WindowUIBridge
Extends: StackUIBridge
Known subtypes: SnapshotUIBridge
Package: dev.joid.lib.bridge.ui · Module: core · Source: WindowUIBridge.java
The default UI bridge, which clears the window to a color every frame and draws text tooltips.
Description
Section titled “Description”The backend registers one when no UI bridge was registered before it.
Get it from BridgeHandler.UI.getBridge(WindowUIBridge.class) to set its colors and its tooltip text, as Style the window UI bridge shows.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
WindowUIBridge | create() factory | Creates a window UI bridge with its default colors and no tooltip text style. |
| WindowUIBridge() protected | Creates the bridge with its default colors, for a subclass. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| background | Color | Color.BLACK | Sets the color that clears the window before every frame, behind every UI. |
| hoverColor | Color | Color.decode("#18181b") | Sets the fill of the tooltip box. |
| hoverInfo | TextInfo | null: no tooltip | Sets the text style of the tooltips; without it, the bridge draws no tooltip and, with the dev jar, prints a warning once. |
| hoverBorderColor | Color | Color.decode("#27272a") | Sets the color of the border, one design pixel wide, of the tooltip box. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | drawHover(UI ui, Object content, double mouseX, double mouseY) | Draws the lines of the tooltip in a rounded box near the pointer, moved to stay inside the window. |
For subclasses
Section titled “For subclasses”| Returns | Signature | Summary |
|---|---|---|
void | drawBackground() hook protected | Clears the color of the window to background, then the depth and the stencil. |
Inherited from StackUIBridge (8)
open · close · add · remove · canHandle · forceOpen · replace · canReplace
Inherited from UIBridge (16)
load · update · mouseMoved · mousePressed · mouseReleased · mouseScroll · charTyped · keyPressed · keyReleased · isKeyConsumed · draw · isOpen · isOnTop · getUiList · isScreenOpen · isOverlayHidden
Inherited from IUIBridge (2)
Creation details
Section titled “Creation details”create
Section titled “create”WindowUIBridge create() factory
Creates a window UI bridge with its default colors and no tooltip text style.
WindowUIBridge
Section titled “WindowUIBridge”WindowUIBridge() protected
Creates the bridge with its default colors, for a subclass.
Property details
Section titled “Property details”background
Section titled “background”this background(Color background)fluentColor getBackground()
Default: Color.BLACK
Sets the color that clears the window before every frame, behind every UI.
hoverColor
Section titled “hoverColor”this hoverColor(Color hoverColor)fluentColor getHoverColor()
Default: Color.decode("#18181b")
Sets the fill of the tooltip box.
hoverInfo
Section titled “hoverInfo”this hoverInfo(TextInfo hoverInfo)fluentTextInfo getHoverInfo()
Default: null: no tooltip
Sets the text style of the tooltips; without it, the bridge draws no tooltip and, with the dev jar, prints a warning once.
hoverBorderColor
Section titled “hoverBorderColor”this hoverBorderColor(Color hoverBorderColor)fluentColor getHoverBorderColor()
Default: Color.decode("#27272a")
Sets the color of the border, one design pixel wide, of the tooltip box.
Method details
Section titled “Method details”drawHover
Section titled “drawHover”void drawHover(UI ui, Object content, double mouseX, double mouseY)
Draws the lines of the tooltip in a rounded box near the pointer, moved to stay inside the window.
drawBackground
Section titled “drawBackground”void drawBackground() hook protected
Clears the color of the window to background, then the depth and the stencil.
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
