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

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

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

Classes

interface  DestroyCallback
 Optional HUD tip destroy callback for the user provided Shape, see Tooltip#destroyTip(GL2ES2, RegionRenderer, Shape). More...
 

Public Member Functions

 TooltipShape (final Vec2f scale, final long delayMS, final int renderModes, final Shape clientShape)
 Ctor of TooltipShape. More...
 
 TooltipShape (final Vec4f backColor, final Vec4f borderColor, final float borderThickness, final Padding padding, final Vec2f scale, final long delayMS, final int renderModes, final Shape clientShape, final DestroyCallback dtor)
 Ctor of TooltipShape. More...
 
Shape getClientShape ()
 
Shape createTip (final Scene scene, final AABBox toolMvBounds)
 Create a new HUD tip shape, usually called by Scene. More...
 
Shape removeTip (final Shape tip)
 Removed the user provided client Shape from the created HUD tipGroup, i.e. More...
 
void destroyTip (final GL2ES2 gl, final RegionRenderer renderer, final Shape tip)
 Destroy a created HUD tip. 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...
 

Static Public Attributes

static DestroyCallback NoOpDtor
 No operation DestroyCallback, e.g. More...
 
- Static Public Attributes inherited from com.jogamp.graph.ui.Tooltip
static final long DEFAULT_DELAY = 1000
 Default tooltip delay is {@value}ms. More...
 

Additional Inherited Members

- 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 HUD Shape Tooltip for client Shape, see Shape#setToolTip(Tooltip).

Definition at line 47 of file TooltipShape.java.

Constructor & Destructor Documentation

◆ TooltipShape() [1/2]

com.jogamp.graph.ui.TooltipShape.TooltipShape ( final Vec2f  scale,
final long  delayMS,
final int  renderModes,
final Shape  clientShape 
)

Ctor of TooltipShape.

The tip Shape including the user provided clientShape will be destroyed via destroyTip(GL2ES2, RegionRenderer, Shape), since no DestroyCallback is being provided via TooltipShape#TooltipShape(Vec2f, long, Shape, DestroyCallback).

Parameters
scaleHUD tip scale for the tip shape
delayMSdelay until HUD tip is visible after timer start (mouse moved)
renderModesGraph's Region render modes, see create(..).
clientShapeuser/client Shape to be presented in the HUD tip

Definition at line 97 of file TooltipShape.java.

◆ TooltipShape() [2/2]

com.jogamp.graph.ui.TooltipShape.TooltipShape ( final Vec4f  backColor,
final Vec4f  borderColor,
final float  borderThickness,
final Padding  padding,
final Vec2f  scale,
final long  delayMS,
final int  renderModes,
final Shape  clientShape,
final DestroyCallback  dtor 
)

Ctor of TooltipShape.

The tip Shape will be destroyed via provided DestroyCallback dtor if not null, otherwise the default Tooltip#destroyTip(GL2ES2, RegionRenderer, Shape) gets called.

In case DestroyCallback dtor is being used, the user clientShape is removed from internal layout shapes before they get destroyed and the single clientShape gets passed to DestroyCallback#destroy(TooltipShape, GL2ES2, RegionRenderer, Shape).

In case user provided clientShape is reused within a DAG, the provided implementation shall do nothing, i.e. use TooltipShape#NoOpDtor.

Parameters
backColoroptional background color
borderColoroptional border color
borderThicknessborder thickness
paddingoptional padding for the given clientShape for the internal wrapper group
scalescale for the HUD tip
delayMSdelay until HUD tip is visible after timer start (mouse moved)
renderModesGraph's Region render modes, see create(..).
clientShapeuser/client Shape to be presented in the HUD tip
dtoroptional DestroyCallback

Definition at line 126 of file TooltipShape.java.

Member Function Documentation

◆ createTip()

Shape com.jogamp.graph.ui.TooltipShape.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 140 of file TooltipShape.java.

Here is the call graph for this function:

◆ destroyTip()

void com.jogamp.graph.ui.TooltipShape.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).

Parameters
glcurrent GL2ES2
renderModesGraph's Region render modes, see create(..).
tipcreated tip Shape via createTip(Scene, AABBox)
See also
createTip(Scene, AABBox)

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

Definition at line 191 of file TooltipShape.java.

Here is the call graph for this function:

◆ getClientShape()

Shape com.jogamp.graph.ui.TooltipShape.getClientShape ( )

Definition at line 137 of file TooltipShape.java.

◆ removeTip()

Shape com.jogamp.graph.ui.TooltipShape.removeTip ( final Shape  tip)

Removed the user provided client Shape from the created HUD tipGroup, i.e.

TooltipShape's layout Group.

This allows the user to release its own passed tip back, e.g. before destruction.

Parameters
tipcreated tip Shape via createTip(Scene, AABBox)
Returns
the user provided client Shape
See also
createTip(Scene, AABBox)

Definition at line 174 of file TooltipShape.java.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ NoOpDtor

DestroyCallback com.jogamp.graph.ui.TooltipShape.NoOpDtor
static
Initial value:
= new DestroyCallback() {
@Override
public void destroy(final TooltipShape tts, final GL2ES2 gl, final RegionRenderer renderer, final Shape tip) { }
}
TooltipShape(final Vec2f scale, final long delayMS, final int renderModes, final Shape clientShape)
Ctor of TooltipShape.

No operation DestroyCallback, e.g.

for a user provide tip Shape, reused within a DAG.

Definition at line 74 of file TooltipShape.java.


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