|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
A HUD tooltip for Shape, see Shape#setToolTip(Tooltip).
More...
Public Member Functions | |
| String | toString () |
| final Shape | getTool () |
Returns Shape 'tool' owning this tooltip, set after Shape#setToolTip(Tooltip). More... | |
| final boolean | stop (final boolean clearForced) |
Stops the timer if not enforced via now() or clearForced is true. More... | |
| final void | start () |
| Starts the timer. More... | |
| final void | now () |
Enforce tooltip display with next tick(). More... | |
| final boolean | forced () |
Returns true if display is enforced via now(). More... | |
| final boolean | tick () |
| Send tick to this tooltip. More... | |
| AABBox | getToolMvBounds (final PMVMatrix4f pmv) |
Little helper for createTip(Scene, AABBox) returning the Mv AABBox of the tool within Scene Mv space. More... | |
| Vec2f | getTipMvPosition (final Scene scene, final PMVMatrix4f pmv, final float tipWidth, final float tipHeight) |
Little helper for createTip(Scene, AABBox) returning the Mv position of the tip within Scene Mv space. More... | |
| Vec2f | getTipMvPosition (final Scene scene, final AABBox toolMvBounds, final float tipWidth, final float tipHeight) |
Little helper for createTip(Scene, AABBox) returning the Mv position of the tip @ center within Scene Mv space. More... | |
| Vec2f | getTipMvPosition (final Scene scene, final Vec3f toolMvPos, final float tipWidth, final float tipHeight) |
Little helper for createTip(Scene, AABBox) returning the Mv position of the tip @ center within Scene Mv space. More... | |
| abstract Shape | createTip (final Scene scene, AABBox toolMvBounds) |
Create a new HUD tip shape, usually called by Scene. More... | |
| void | destroyTip (final GL2ES2 gl, final RegionRenderer renderer, final Shape tip) |
Destroy a created HUD tip. More... | |
Static Public Attributes | |
| static final long | DEFAULT_DELAY = 1000 |
| Default tooltip delay is {@value}ms. More... | |
Protected Member Functions | |
| Tooltip (final Vec4f backColor, final Vec4f frontColor, final long delayMS, final int renderModes) | |
Protected Attributes | |
| final int | renderModes |
Graph's Region render modes, see create(..). More... | |
| final Vec4f | backColor = new Vec4f(1, 1, 1, 0.9f) |
| final Vec4f | frontColor = new Vec4f(0.2f, 0.2f, 0.2f, 1) |
A HUD tooltip for Shape, see Shape#setToolTip(Tooltip).
Definition at line 44 of file Tooltip.java.
|
protected |
| backColor | optional HUD tip background color, if null a slightly transparent white background is used |
| frontColor | optional HUD tip front color, if null an opaque almost-black is used |
| delayMS | delay until HUD tip is visible after timer start (mouse moved), zero implies no time based alarm |
| renderModes | Graph's Region render modes, see create(..). |
Definition at line 73 of file Tooltip.java.
|
abstract |
Create a new HUD tip shape, usually called by Scene.
| scene | the Scene caller for which this HUD tip shape is created |
| toolMvBounds | AABBox of the getTool() in model-view (Mv) space of the given Scene |
Reimplemented in com.jogamp.graph.ui.TooltipShape, and com.jogamp.graph.ui.TooltipText.
| void com.jogamp.graph.ui.Tooltip.destroyTip | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer, | ||
| final Shape | tip | ||
| ) |
Destroy a created HUD tip.
Called after Scene#removeShape(Shape), allowing implementation to perform certain resource cleanup tasks. Even keeping the Shape tip alive is possible.
This default implementation simply calls Shape#destroy(GL2ES2, RegionRenderer).
| gl | current GL2ES2 |
| renderModes | Graph's Region render modes, see create(..). |
| tip | created tip Shape via createTip(Scene, AABBox) |
Reimplemented in com.jogamp.graph.ui.TooltipShape.
Definition at line 223 of file Tooltip.java.
| final boolean com.jogamp.graph.ui.Tooltip.forced | ( | ) |
Returns true if display is enforced via now().
Definition at line 125 of file Tooltip.java.
| Vec2f com.jogamp.graph.ui.Tooltip.getTipMvPosition | ( | final Scene | scene, |
| final AABBox | toolMvBounds, | ||
| final float | tipWidth, | ||
| final float | tipHeight | ||
| ) |
Little helper for createTip(Scene, AABBox) returning the Mv position of the tip @ center within Scene Mv space.
Definition at line 162 of file Tooltip.java.
| Vec2f com.jogamp.graph.ui.Tooltip.getTipMvPosition | ( | final Scene | scene, |
| final PMVMatrix4f | pmv, | ||
| final float | tipWidth, | ||
| final float | tipHeight | ||
| ) |
Little helper for createTip(Scene, AABBox) returning the Mv position of the tip within Scene Mv space.
Definition at line 158 of file Tooltip.java.
| Vec2f com.jogamp.graph.ui.Tooltip.getTipMvPosition | ( | final Scene | scene, |
| final Vec3f | toolMvPos, | ||
| final float | tipWidth, | ||
| final float | tipHeight | ||
| ) |
Little helper for createTip(Scene, AABBox) returning the Mv position of the tip @ center within Scene Mv space.
Definition at line 182 of file Tooltip.java.
| final Shape com.jogamp.graph.ui.Tooltip.getTool | ( | ) |
Returns Shape 'tool' owning this tooltip, set after Shape#setToolTip(Tooltip).
Definition at line 89 of file Tooltip.java.
| AABBox com.jogamp.graph.ui.Tooltip.getToolMvBounds | ( | final PMVMatrix4f | pmv | ) |
Little helper for createTip(Scene, AABBox) returning the Mv AABBox of the tool within Scene Mv space.
Method uses getTool()
return getTool().getBounds().transform(pmv.getMv(), new AABBox());
Definition at line 154 of file Tooltip.java.
| final void com.jogamp.graph.ui.Tooltip.now | ( | ) |
Enforce tooltip display with next tick().
Definition at line 119 of file Tooltip.java.
| final void com.jogamp.graph.ui.Tooltip.start | ( | ) |
Starts the timer.
Definition at line 112 of file Tooltip.java.
| final boolean com.jogamp.graph.ui.Tooltip.stop | ( | final boolean | clearForced | ) |
Stops the timer if not enforced via now() or clearForced is true.
| clearForced | if true, also clears enforced flag set by now() |
Definition at line 98 of file Tooltip.java.
| final boolean com.jogamp.graph.ui.Tooltip.tick | ( | ) |
Send tick to this tooltip.
started timer has been reached or is enforced via now() to createTip(PMVMatrix4f), otherwise false Definition at line 133 of file Tooltip.java.
| String com.jogamp.graph.ui.Tooltip.toString | ( | ) |
Definition at line 63 of file Tooltip.java.
Definition at line 59 of file Tooltip.java.
|
static |
Default tooltip delay is {@value}ms.
Definition at line 47 of file Tooltip.java.
Definition at line 60 of file Tooltip.java.
|
protected |
Graph's Region render modes, see create(..).
Definition at line 58 of file Tooltip.java.