28package com.jogamp.graph.ui;
30import com.jogamp.common.util.StringUtil;
31import com.jogamp.graph.curve.Region;
32import com.jogamp.graph.curve.opengl.GLRegion;
33import com.jogamp.graph.font.Font;
34import com.jogamp.graph.ui.shapes.Button;
35import com.jogamp.math.Vec2f;
36import com.jogamp.math.Vec4f;
37import com.jogamp.math.geom.AABBox;
38import com.jogamp.math.geom.plane.AffineTransform;
39import com.jogamp.opengl.GLProfile;
44 private final CharSequence tipText;
46 private final Font tipFont;
47 private final float scaleY;
60 final float scaleY,
final long delayMS,
final int renderModes)
63 this.tipText = tipText;
64 this.tipFont = tipFont;
75 public TooltipText(
final CharSequence tipText,
final Font tipFont,
final float scaleY) {
91 final float totalH = tipBox_em.
getHeight() * ( 1 + 0.5f/StringUtil.getLineCount(tipText) );
94 float h = toolMvBounds.
getHeight() * scaleY * ( 1 + dys );
96 if( w > sceneAABox.
getWidth() * 0.9f) {
99 }
else if( h > sceneAABox.
getHeight() * 0.9f) {
106 .
moveTo(pos.x(), pos.y(), 100*zEps)
Abstract Outline shape representation define the method an OutlineShape(s) is bound and rendered.
static final int VBAA_RENDERING_BIT
Rendering-Mode bit for Region.
static float getZEpsilon(final int zBits, final PMVMatrixSetup setup)
Default Z precision on 16-bit depth buffer using -1 z-position and DEFAULT_ZNEAR.
AABBox getBounds(final PMVMatrix4f pmv, final Shape shape)
Returns AABBox dimension of given Shape from this container's perspective, i.e.
Generic Shape, potentially using a Graph via GraphShape or other means of representing content.
final Shape setInteractive(final boolean v)
Set whether this shape is interactive in general, i.e.
final Shape moveTo(final float tx, final float ty, final float tz)
Move to scaled position.
A round HUD text Tooltip for Shape, see Shape#setToolTip(Tooltip).
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...
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.
Shape createTip(final Scene scene, final AABBox toolMvBounds)
Create a new HUD tip shape, usually called by Scene.
2D Vector based upon two float components.
4D Vector based upon four float components.
Axis Aligned Bounding Box.
Interface wrapper for font implementation.
AABBox getGlyphBounds(final CharSequence string)
Try using getGlyphBounds(CharSequence, AffineTransform, AffineTransform) to reuse AffineTransform ins...