28package com.jogamp.graph.ui;
30import com.jogamp.graph.curve.Region;
31import com.jogamp.graph.curve.opengl.GLRegion;
32import com.jogamp.graph.curve.opengl.RegionRenderer;
33import com.jogamp.graph.ui.layout.Alignment;
34import com.jogamp.graph.ui.layout.BoxLayout;
35import com.jogamp.graph.ui.layout.Padding;
36import com.jogamp.graph.ui.shapes.Rectangle;
37import com.jogamp.math.Vec2f;
38import com.jogamp.math.Vec4f;
39import com.jogamp.math.geom.AABBox;
40import com.jogamp.opengl.GL2ES2;
41import com.jogamp.opengl.GLProfile;
42import com.jogamp.opengl.util.texture.TextureSequence;
44import jogamp.graph.ui.TreeTool;
80 private final Shape clientShape;
81 private final Vec2f scale;
82 private final float borderThickness;
84 private final DestroyCallback dtorCallback;
98 this(
null,
null, 0,
null, scale, delayMS,
renderModes, clientShape,
null);
130 this.clientShape = clientShape;
132 this.borderThickness = borderThickness;
133 this.padding = padding;
134 this.dtorCallback = dtor;
143 final float w = toolMvBounds.
getWidth()*scale.x();
144 final float h = toolMvBounds.
getHeight()*scale.y();
147 final Group tipWrapper =
new Group(
"TTS.wrapper",
null,
null, clientShape);
148 if(
null != padding ) {
153 .setBorder(borderThickness).setBorderColor(
frontColor)
154 .setName(
"TTS.frame").move(0, 0, -zEps));
160 tipGroup.
moveTo(pos.x(), pos.y(), 100*zEps);
175 final Shape cs = clientShape;
180 System.err.println(
"TooltipShape.destroyTip: Warning: ClientShape "+cs.
getName()+
" not contained in "+tipWrapper.
getName()+
"; Internal Group: ");
181 TreeTool.forAll(tipGroup, (
final Shape s) -> {
182 System.err.println(
"- "+s.
getName());
192 if(
null != dtorCallback ) {
195 dtorCallback.destroy(
this, gl, renderer, cs);
197 super.destroyTip(gl, renderer, tip);
Group of Shapes, optionally utilizing a Group.Layout.
Shape getShapeByIdx(final int id)
void addShape(final Shape s)
Adds a Shape.
Shape removeShape(final Shape s)
Removes given shape, w/o Shape#destroy(GL2ES2, RegionRenderer).
static float getZEpsilon(final int zBits, final PMVMatrixSetup setup)
Default Z precision on 16-bit depth buffer using -1 z-position and DEFAULT_ZNEAR.
Generic Shape, potentially using a Graph via GraphShape or other means of representing content.
Shape setName(final String name)
Set a symbolic name for this shape for identification.
final String getName()
Return the optional symbolic name for this shape, defaults to noname.
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.
final Shape setPaddding(final Padding padding)
Sets the unscaled padding for this shape, which is included in unscaled getBounds() and also includes...
final void destroy(final GL2ES2 gl, final RegionRenderer renderer)
Destroys all data.
Immutable layout alignment options, including Bit#Fill.
static final Alignment FillCenter
Bit#Fill, Bit#CenterHoriz and Bit#CenterVert alignment constant.
GraphUI Stack Group.Layout.
GraphUI CSS property Padding, unscaled space belonging to the element and included in the element's s...
A GraphUI rectangle GraphShape.
2D Vector based upon two float components.
4D Vector based upon four float components.
Axis Aligned Bounding Box.