JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.graph.ui.TooltipText Class Reference

A round HUD text Tooltip for Shape, see Shape#setToolTip(Tooltip). More...

Inheritance diagram for com.jogamp.graph.ui.TooltipText:
Collaboration diagram for com.jogamp.graph.ui.TooltipText:

Public Member Functions

 TooltipText (final CharSequence tipText, final Font tipFont, final Vec4f backColor, final Vec4f labelColor, final float scaleY, final long delayMS, final int renderModes)
 Ctor of TooltipText. More...
 
 TooltipText (final CharSequence tipText, final Font tipFont, final float scaleY)
 Ctor of TooltipText using Tooltip#DEFAULT_DELAY, Region#VBAA_RENDERING_BIT and a slightly transparent white background with an opaque almost-black text color. More...
 
Shape createTip (final Scene scene, final AABBox toolMvBounds)
 Create a new HUD tip shape, usually called by Scene. More...
 
- Public Member Functions inherited from com.jogamp.graph.ui.Tooltip
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...
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.graph.ui.Tooltip
static final long DEFAULT_DELAY = 1000
 Default tooltip delay is {@value}ms. More...
 
- Protected Member Functions inherited from com.jogamp.graph.ui.Tooltip
 Tooltip (final Vec4f backColor, final Vec4f frontColor, final long delayMS, final int renderModes)
 
- Protected Attributes inherited from com.jogamp.graph.ui.Tooltip
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)
 

Detailed Description

A round HUD text Tooltip for Shape, see Shape#setToolTip(Tooltip).

Definition at line 42 of file TooltipText.java.

Constructor & Destructor Documentation

◆ TooltipText() [1/2]

com.jogamp.graph.ui.TooltipText.TooltipText ( final CharSequence  tipText,
final Font  tipFont,
final Vec4f  backColor,
final Vec4f  labelColor,
final float  scaleY,
final long  delayMS,
final int  renderModes 
)

Ctor of TooltipText.

Parameters
tipTextHUD tip text
tipFontHUD tip font
backColoroptional HUD tip background color, if null a slightly transparent white background is used
labelColoroptional HUD tip front color, if null an opaque almost-black is used
scaleYHUD tip vertical scale against tool height
delayMSdelay until HUD tip is visible after timer start (mouse moved)
renderModesGraph's Region render modes, see create(..).

Definition at line 59 of file TooltipText.java.

◆ TooltipText() [2/2]

com.jogamp.graph.ui.TooltipText.TooltipText ( final CharSequence  tipText,
final Font  tipFont,
final float  scaleY 
)

Ctor of TooltipText using Tooltip#DEFAULT_DELAY, Region#VBAA_RENDERING_BIT and a slightly transparent white background with an opaque almost-black text color.

Parameters
tipTextHUD tip text
tipFontHUD tip font
scaleYHUD tip vertical scale against tool height
toolthe tool shape for this tip

Definition at line 75 of file TooltipText.java.

Member Function Documentation

◆ createTip()

Shape com.jogamp.graph.ui.TooltipText.createTip ( final Scene  scene,
final AABBox  toolMvBounds 
)

Create a new HUD tip shape, usually called by Scene.

Parameters
scenethe Scene caller for which this HUD tip shape is created
toolMvBoundsAABBox of the getTool() in model-view (Mv) space of the given Scene
Returns
newly created HUD tip shape
See also
destroyTip(GL2ES2, RegionRenderer, Shape)

Reimplemented from com.jogamp.graph.ui.Tooltip.

Definition at line 80 of file TooltipText.java.

Here is the call graph for this function:

The documentation for this class was generated from the following file: