|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
A GraphUI text labeled BaseButton GraphShape.
More...
Public Member Functions | |
| Button (final int renderModes, final Font labelFont, final CharSequence labelText, final float width, final float height) | |
Create a text labeled button Graph based GLRegion UI Shape. More... | |
| Button (final int renderModes, final Font labelFont, final CharSequence labelText, final float width, final float height, final float zOffset) | |
Create a text labeled button Graph based GLRegion UI Shape. More... | |
| Button (final int renderModes, final Font labelFont, final CharSequence labelTextOff, final CharSequence labelTextOn, final float width, final float height, final float zOffset) | |
Create a text labeled button Graph based GLRegion UI Shape. More... | |
| Font | getFont () |
Returns the label Font. More... | |
| CharSequence | getText () |
| Returns the text of the current label. More... | |
| void | draw (final GL2ES2 gl, final RegionRenderer renderer) |
| Renders the shape. More... | |
| float | getLabelZOffset () |
| Button | setLabelZOffset (final float v) |
Set the Z-axis offset to the given value, used to separate the BaseButton from the Label. More... | |
| Button | setLabelZOffset (final int zBits, final float zDist, final float zNear) |
Set the Z-axis offset to the smallest resolvable Z separation at the given range, used to separate the BaseButton from the Label. More... | |
| final Vec2f | getFixedLabelSize () |
Returns the current fixed label font size, see {@Link setFixedLabelSize(Vec2f)} and setSpacing(Vec2f, Vec2f). More... | |
| final Button | setFixedLabelSize (final float w, final float h) |
| Sets fixed label font size clipped to range [0 . More... | |
| final Button | setFixedLabelSize (final Vec2f v) |
| final Vec2f | getSpacing () |
Returns the current spacing size, see {@Link setSpacing(Vec2f)} and setSpacing(Vec2f, Vec2f). More... | |
| final Button | setSpacing (final float spacingX, final float spacingY) |
| Sets spacing in percent of text label, clipped to range [0 . More... | |
| final Button | setSpacing (final Vec2f spacing) |
| Sets spacing in percent of text label, clipped to range [0 . More... | |
| final Button | setSpacing (final Vec2f spacing, final Vec2f fixedLabelSize) |
Sets spacing setSpacing(Vec2f) and fixed label font size setFixedLabelSize(Vec2f) for convenience. More... | |
| final Vec4f | getLabelColor () |
| Returns the label color. More... | |
| final Button | setLabelColor (final Vec4f c) |
| Sets the label color, consider using alpha 1. More... | |
| final Button | setLabelColor (final float r, final float g, final float b, final float a) |
| Sets the label color, consider using alpha 1. More... | |
| final Button | setFont (final Font labelFont) |
| Sets the label font. More... | |
| final Button | setText (final CharSequence labelText) |
| Sets the current label text. More... | |
| final Button | setText (final Font labelFont, final CharSequence labelText) |
| Sets the current label text. More... | |
| String | getSubString () |
Public Member Functions inherited from com.jogamp.graph.ui.shapes.BaseButton | |
| BaseButton (final int renderModes, final float width, final float height) | |
Create a base button Graph based GLRegion UI Shape with a ROUND_CORNER. More... | |
| final float | getWidth () |
| final float | getHeight () |
| final float | getCorner () |
| BaseButton | setCorner (final float corner) |
| Set corner size with range [0.01 . More... | |
| BaseButton | setPerp () |
Sets a perpendicular corner. More... | |
| BaseButton | setSize (final float width, final float height) |
| String | getSubString () |
Public Member Functions inherited from com.jogamp.graph.ui.GraphShape | |
| final int | getRenderModesReq () |
Returns requested Graph Region render modes, see create(..). More... | |
| final int | getRenderModes () |
Returns validated Graph Region render modes, see create(..). More... | |
| void | setTextureUnit (final int pass2TexUnit) |
| Set the 2nd pass texture unit. More... | |
| final GraphShape | setSharpness (final float sharpness) |
Sets the shape's Graph OutlineShape's sharpness parameter. More... | |
| final float | getSharpness () |
Return the shape's Graph OutlineShape's sharpness value. More... | |
| boolean | hasColorChannel () |
Returns true if implementation uses an extra color channel or texture which will be modulated with the passed rgba color drawImpl0(GL2ES2, RegionRenderer, float[]). More... | |
| GLRegion | getRegion () |
| String | getSubString () |
Public Member Functions inherited from com.jogamp.graph.ui.Shape | |
| Group | getParent () |
Returns the last parent container Group this shape has been added to or null. More... | |
| final Shape | setID (final int id) |
| Set a symbolic ID for this shape for identification. More... | |
| final int | getID () |
| Return the optional symbolic ID for this shape. More... | |
| Shape | setName (final String name) |
| Set a symbolic name for this shape for identification. More... | |
| final String | getName () |
Return the optional symbolic name for this shape, defaults to noname. More... | |
| boolean | isGroup () |
Returns true if this shape denotes a Group, otherwise false. More... | |
| final boolean | isVisible () |
Returns true if this shape is set visible by the user, otherwise false. More... | |
| final Shape | setVisible (final boolean v) |
| Enable (default) or disable this shape's visibility. More... | |
| final Shape | setPaddding (final Padding padding) |
Sets the unscaled padding for this shape, which is included in unscaled getBounds() and also includes the border. More... | |
| Padding | getPadding () |
Returns unscaled Padding of this shape, which is included in unscaled getBounds() and also includes the border. More... | |
| boolean | hasPadding () |
Returns true if setPaddding(Padding) added a non Padding#zeroSize() spacing to this shape. More... | |
| final Shape | setBorder (final float thickness) |
Sets the thickness of the border, which is included in getBounds() and is outside of getPadding(). More... | |
| final boolean | hasBorder () |
Returns true if a border has been enabled via setBorder(float, Padding). More... | |
| final float | getBorderThickness () |
Returns the border thickness, see setBorder(float, Padding). More... | |
| final void | runSynced (final Runnable action) |
Perform given Runnable action synchronized. More... | |
| final void | clear (final GL2ES2 gl, final RegionRenderer renderer) |
| Clears all data and reset all states as if this instance was newly created. More... | |
| final void | destroy (final GL2ES2 gl, final RegionRenderer renderer) |
| Destroys all data. More... | |
| final void | onDraw (final DrawListener l) |
Set a user one-shot initializer callback or custom draw(GL2ES2, RegionRenderer) hook. More... | |
| final void | onHover (final PointerListener l) |
| Set user callback to be notified when a pointer/mouse is moving over this shape. More... | |
| final void | onMove (final MoveListener l) |
Set user callback to be notified when shape is move(Vec3f)'ed. More... | |
| final void | onToggle (final Listener l) |
Set user callback to be notified when shape toggle()'ed. More... | |
| final void | onClicked (final PointerListener l) |
| Set user callback to be notified when shape is clicked. More... | |
| final Shape | addActivationListener (final Listener l) |
| Add user callback to be notified when shape is activated (pointer-over and/or click) or de-activated (pointer left). More... | |
| final Shape | removeActivationListener (final Listener l) |
| final Shape | moveTo (final float tx, final float ty, final float tz) |
| Move to scaled position. More... | |
| final Shape | moveTo (final Vec3f t) |
| Move to scaled position. More... | |
| final Shape | move (final float dtx, final float dty, final float dtz) |
| Move about scaled distance. More... | |
| final Shape | move (final Vec3f dt) |
| Move about scaled distance. More... | |
| final Vec3f | getPosition () |
Returns position Vec3f reference, i.e. More... | |
| final Quaternion | getRotation () |
Returns Quaternion for rotation. More... | |
| final Shape | setRotation (final Quaternion q) |
Sets the rotation Quaternion. More... | |
| final Vec3f | getRotationPivot () |
Return unscaled rotation origin Vec3f reference, aka pivot. More... | |
| final Shape | setRotationPivot (final float px, final float py, final float pz) |
| Set unscaled rotation origin, aka pivot. More... | |
| final Shape | setRotationPivot (final Vec3f pivot) |
| Set unscaled rotation origin, aka pivot. More... | |
| final Shape | setScale (final Vec3f s) |
| Set scale factor to given scale. More... | |
| final Shape | setScale (final float sx, final float sy, final float sz) |
| Set scale factor to given scale. More... | |
| final Shape | scale (final Vec3f s) |
| Multiply current scale factor by given scale. More... | |
| final Shape | scale (final float sx, final float sy, final float sz) |
| Multiply current scale factor by given scale. More... | |
| final Vec3f | getScale () |
Returns scale Vec3f reference. More... | |
| final void | markShapeDirty () |
Marks the shape dirty, causing next draw() to recreate the Graph shape and reset the region. More... | |
| final void | markStateDirty () |
Marks the rendering state dirty, causing next draw() to notify the Graph region to reselect shader and repaint potentially used FBOs. More... | |
| final AABBox | getBounds () |
Returns the unscaled bounding AABBox for this shape, borrowing internal instance. More... | |
| final float | getScaledWidth () |
Returns the scaled width of the bounding AABBox for this shape. More... | |
| final float | getScaledHeight () |
Returns the scaled height of the bounding AABBox for this shape. More... | |
| final float | getScaledDepth () |
| final AABBox | getBounds (final GLProfile glp) |
Returns the unscaled bounding AABBox for this shape. More... | |
| void | drawToSelect (final GL2ES2 gl, final RegionRenderer renderer) |
Experimental selection draw command used by Scene. More... | |
| void | draw (final GL2ES2 gl, final RegionRenderer renderer) |
| Renders the shape. More... | |
| final Shape | validate (final GL2ES2 gl) |
Validates the shape's underlying GLRegion. More... | |
| final Shape | validate (final GLProfile glp) |
Validates the shape's underlying GLRegion w/o a current GL2ES2 object. More... | |
| final Shape | validate (final GL2ES2 gl, final GLProfile glp) |
Validate the shape via validate(GL2ES2) if gl is not null, otherwise uses validate(GLProfile). More... | |
| final void | applyMatToMv (final PMVMatrix4f pmv) |
Applies the internal Matrix4f to the given modelview matrix, i.e. More... | |
| final Matrix4f | getMat () |
Returns the internal Matrix4f reference. More... | |
| final Matrix4f | getMat (final Matrix4f out) |
Returns a copy of the internal Matrix4f to out. More... | |
| final boolean | isMatIdentity () |
Returns true if getMat() has not been mutated, i.e. More... | |
| final void | updateMat () |
Updates the internal Matrix4f with local position, rotation and scale. More... | |
| final PMVMatrix4f | setPMVMatrix (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final PMVMatrix4f pmv) |
Setup the given PMVMatrix4f and apply this shape's transformation. More... | |
| final PMVMatrix4f | setPMVMatrix (final Scene scene, final PMVMatrix4f pmv) |
Setup the given PMVMatrix4f and apply this shape's transformation. More... | |
| final Recti | getSurfacePort (final PMVMatrix4f pmv, final Recti viewport, final Recti surfacePort) |
| Retrieve surface (view) port of this shape, i.e. More... | |
| final int[] | getSurfaceSize (final PMVMatrix4f pmv, final Recti viewport, final int[] surfaceSize) |
| Retrieve surface (view) size in pixels of this shape. More... | |
| final int[] | getSurfaceSize (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final PMVMatrix4f pmv, final int[] surfaceSize) |
| Retrieve surface (view) size in pixels of this shape. More... | |
| final int[] | getSurfaceSize (final Scene scene, final PMVMatrix4f pmv, final int[] surfaceSize) |
| Retrieve surface (view) size in pixels of this shape. More... | |
| final float[] | getPixelPerShapeUnit (final int[] shapeSizePx, final float[] pixPerShape) |
| Retrieve pixel per scaled shape-coordinate unit, i.e. More... | |
| final float[] | getPixelPerShapeUnit (final PMVMatrix4f pmv, final Recti viewport, final float[] pixPerShape) |
| Retrieve pixel per scaled shape-coordinate unit, i.e. More... | |
| final float[] | getPixelPerShapeUnit (final Scene scene, final PMVMatrix4f pmv, final float[] pixPerShape) |
| Retrieve pixel per scaled shape-coordinate unit, i.e. More... | |
| final int[] | shapeToWinCoord (final PMVMatrix4f pmv, final Recti viewport, final Vec3f objPos, final int[] glWinPos) |
| Map given object coordinate relative to this shape to window coordinates. More... | |
| final int[] | shapeToWinCoord (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final Vec3f objPos, final PMVMatrix4f pmv, final int[] glWinPos) |
| Map given object coordinate relative to this shape to window coordinates. More... | |
| final int[] | shapeToWinCoord (final Scene scene, final Vec3f objPos, final PMVMatrix4f pmv, final int[] glWinPos) |
| Map given object coordinate relative to this shape to window coordinates. More... | |
| final Vec3f | winToShapeCoord (final PMVMatrix4f pmv, final Recti viewport, final int glWinX, final int glWinY, final Vec3f objPos) |
| Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. More... | |
| final Vec3f | winToShapeCoord (final Scene.PMVMatrixSetup pmvMatrixSetup, final Recti viewport, final int glWinX, final int glWinY, final PMVMatrix4f pmv, final Vec3f objPos) |
| Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. More... | |
| final Vec3f | winToShapeCoord (final Scene scene, final int glWinX, final int glWinY, final PMVMatrix4f pmv, final Vec3f objPos) |
| Map given gl-window-coordinates to object coordinates relative to this shape and its z-coordinate. More... | |
| final Vec4f | getColor () |
Returns base-color w/o color channel, will be modulated w/ getPressedColorMod(), getToggleOnColorMod(), getToggleOffColorMod() and getActiveColorMod(). More... | |
| final Vec4f | getPressedColorMod () |
Returns modulation color when isPressed(). More... | |
| final Vec4f | getToggleOnColorMod () |
Returns modulation color when isToggleOn(). More... | |
| final Vec4f | getToggleOffColorMod () |
Returns modulation color when not isToggleOn(). More... | |
| final Vec4f | getActiveColorMod () |
Returns modulation color when isActive(). More... | |
| Shape | setColor (final float r, final float g, final float b, final float a) |
| Set base color. More... | |
| Shape | setColor (final Vec4f c) |
| Set base color. More... | |
| Shape | setPressedColorMod (final float r, final float g, final float b, final float a) |
Set pressed color, modulating getColor() if isPressed(). More... | |
| final Shape | setToggleOnColorMod (final float r, final float g, final float b, final float a) |
Set toggle-on color, modulating getColor() if isToggleOn() and setToggleable(boolean). More... | |
| final Shape | setToggleOffColorMod (final float r, final float g, final float b, final float a) |
Set toggle-off color, modulating getColor() if !isToggleOn() and setToggleable(boolean). More... | |
| final Shape | setActiveColorMod (final Vec4f c) |
Enable active color, modulation getColor() if isActive() with passing c != null, disable with passing c == null. More... | |
| final Vec4f | getBorderColor () |
| final Shape | setBorderColor (final float r, final float g, final float b, final float a) |
| Set border color. More... | |
| final Shape | setBorderColor (final Vec4f c) |
| Set border color. More... | |
| final String | toString () |
| String | getSubString () |
| final Shape | setPressed (final boolean b) |
| final boolean | isPressed () |
| final Shape | setToggleable (final boolean toggleable) |
| Set this shape toggleable, default is off. More... | |
| boolean | isToggleable () |
| Returns true if this shape is toggable, i.e. More... | |
| final Shape | setToggle (final boolean v) |
| Set this shape's toggle state, default is off. More... | |
| final Shape | toggle () |
| final boolean | isToggleOn () |
| Returns true this shape's toggle state. More... | |
| final boolean | isActive () |
| Returns true of this shape is active. More... | |
| final float | getAdjustedZ () |
| Tooltip | setToolTip (final Tooltip newTooltip) |
Set's a new Tooltip for this shape. More... | |
| void | removeToolTip () |
| Tooltip | getTooltip () |
| final Shape | setInteractive (final boolean v) |
| Set whether this shape is interactive in general, i.e. More... | |
| final boolean | isInteractive () |
Returns if this shape allows user interaction in general, see setInteractive(boolean). More... | |
| final Shape | setActivable (final boolean v) |
Set whether this shape is allowed to be activated, i.e become isActive(). More... | |
| final boolean | isActivable () |
Returns if this shape is allowed to be activated, i.e become isActive(). More... | |
| final Shape | setDiscarded (final boolean v) |
Set whether this shape is discarded in last draw(GL2ES2, RegionRenderer), i.e. More... | |
| final boolean | isDiscarded () |
Returns whether this shape is discarded in last draw(GL2ES2, RegionRenderer), i.e. More... | |
| final Shape | setDraggable (final boolean draggable) |
| Set whether this shape is draggable, i.e. More... | |
| final boolean | isDraggable () |
| Returns if this shape is draggable, a user interaction. More... | |
| final Shape | setResizable (final boolean resizable) |
| Set whether this shape is resizable, i.e. More... | |
| final boolean | isResizable () |
| Returns if this shape is resizable, a user interaction. More... | |
| final boolean | isFixedARatioResize () |
Returns if aspect-ratio shall be kept at resize, if isResizable(). More... | |
| final Shape | setFixedARatioResize (final boolean v) |
Sets whether aspect-ratio shall be kept at resize, if isResizable(). More... | |
| final Shape | setDragAndResizable (final boolean v) |
| Set whether this shape is draggable and resizable. More... | |
| final Shape | addMouseListener (final MouseGestureListener l) |
| final Shape | removeMouseListener (final MouseGestureListener l) |
| void | receiveMouseEvents (final Shape source) |
Forward MouseGestureListener events to this Shape from source using a ForwardMouseListener. More... | |
| final Shape | addKeyListener (final KeyListener l) |
| final Shape | removeKeyListener (final KeyListener l) |
| void | receiveKeyEvents (final Shape source) |
Forward KeyListener events to this Shape from source using a ForwardKeyListener. More... | |
| abstract boolean | hasColorChannel () |
Returns true if implementation uses an extra color channel or texture which will be modulated with the passed rgba color drawImpl0(GL2ES2, RegionRenderer, float[]). More... | |
Static Public Attributes | |
| static final float | DEFAULT_SPACING_X = 0.20f |
| {@value} More... | |
| static final float | DEFAULT_SPACING_Y = 0.46f |
| {@value} More... | |
| static final float | DEFAULT_LABEL_ZOFFSET = 0.000153f |
Default Z-axis offset, using the smallest resolvable Z separation rounded value {@value} at 16-bits depth buffer, -1 z-distance and 0.1 z-near, used to separate the BaseButton from the Label. More... | |
Static Public Attributes inherited from com.jogamp.graph.ui.shapes.BaseButton | |
| static final float | ROUND_CORNER = 1f |
Round corner, value {@value}. More... | |
| static final float | PERP_CORNER = 0f |
Perpendicular corner for a rectangular shape, value {@value}. More... | |
Static Public Attributes inherited from com.jogamp.graph.ui.Shape | |
| static Comparator< Shape > | ZAscendingComparator |
| static Comparator< Shape > | ZDescendingComparator |
Protected Member Functions | |
| void | toggleNotify (final boolean on) |
| void | addShapeToRegion (final GLProfile glp, final GL2ES2 gl) |
Protected Member Functions inherited from com.jogamp.graph.ui.shapes.BaseButton | |
| void | addShapeToRegion (final GLProfile glp, final GL2ES2 gl) |
| OutlineShape | createBaseShape (final float zOffset) |
| void | createSharpOutline (final OutlineShape shape, final float zOffset) |
| void | createCurvedOutline (final OutlineShape shape, final float zOffset) |
Protected Member Functions inherited from com.jogamp.graph.ui.GraphShape | |
| GraphShape (final int renderModes) | |
Create a generic Graph based GLRegion UI Shape. More... | |
| final void | clearImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Custom clear(GL2ES2, RegionRenderer) task, called 1st. More... | |
| final void | destroyImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Custom destroy(GL2ES2, RegionRenderer) task, called 1st. More... | |
| void | drawImpl0 (final GL2ES2 gl, final RegionRenderer renderer, final Vec4f rgba) |
Actual draw implementation, called by draw(GL2ES2, RegionRenderer). More... | |
| final void | drawToSelectImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Actual draw implementation, called by drawToSelect(GL2ES2, RegionRenderer). More... | |
| final void | resetGLRegion (final GLProfile glp, final GL2ES2 gl, final TextureSequence colorTexSeq, int vertexCount, int indexCount) |
Reset the GLRegion and reserving its buffers to have a free capacity for vertexCount and indexCount elements. More... | |
| final void | resetGLRegion (final GLProfile glp, final GL2ES2 gl, final TextureSequence colorTexSeq, final OutlineShape shape) |
Convenient resetGLRegion(GLProfile, GL2ES2, TextureSequence, int, int) variant determining initial GLRegion buffer sizes via Region#countOutlineShape(OutlineShape, int[]). More... | |
| final void | validateImpl (final GL2ES2 gl, final GLProfile glp) |
| void | clearImpl (final GL2ES2 gl, final RegionRenderer renderer) |
| void | destroyImpl (final GL2ES2 gl, final RegionRenderer renderer) |
| abstract void | addShapeToRegion (GLProfile glp, GL2ES2 gl) |
Protected Member Functions inherited from com.jogamp.graph.ui.Shape | |
| Shape () | |
Create a generic UI Shape. More... | |
| void | setParent (final Group c) |
| final void | dispatchActivationEvent (final Shape s) |
| Dispatch activation event event to this shape. More... | |
| boolean | isShapeDirty () |
Returns the shape's dirty state, see markShapeDirty(). More... | |
| final boolean | isStateDirty () |
Returns the rendering dirty state, see markStateDirty(). More... | |
| final String | getDirtyString () |
| void | toggleNotify (final boolean on) |
| final boolean | setActive (final boolean v, final float zOffset) |
| abstract void | validateImpl (final GL2ES2 gl, final GLProfile glp) |
| abstract void | drawImpl0 (final GL2ES2 gl, final RegionRenderer renderer, final Vec4f rgba) |
Actual draw implementation, called by draw(GL2ES2, RegionRenderer). More... | |
| abstract void | drawToSelectImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Actual draw implementation, called by drawToSelect(GL2ES2, RegionRenderer). More... | |
| abstract void | clearImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Custom clear(GL2ES2, RegionRenderer) task, called 1st. More... | |
| abstract void | destroyImpl0 (final GL2ES2 gl, final RegionRenderer renderer) |
Custom destroy(GL2ES2, RegionRenderer) task, called 1st. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from com.jogamp.graph.ui.GraphShape | |
| static void | addRectangle (final Region region, final float sharpness, final AABBox box, final Padding padding, final float borderThickness, final Vec4f color) |
Protected Attributes inherited from com.jogamp.graph.ui.shapes.BaseButton | |
| float | width |
| float | height |
| float | corner = ROUND_CORNER |
Protected Attributes inherited from com.jogamp.graph.ui.GraphShape | |
| final int | renderModesReq |
| int | renderModes |
| int | pass2TexUnit = GLRegion.DEFAULT_TWO_PASS_TEXTURE_UNIT |
| GLRegion | region = null |
| float | oshapeSharpness = OutlineShape.DEFAULT_SHARPNESS |
Protected Attributes inherited from com.jogamp.graph.ui.Shape | |
| final AABBox | box = new AABBox() |
| final Vec4f | rgbaColor = new Vec4f(0.60f, 0.60f, 0.60f, 1.0f) |
| Default base-color w/o color channel, will be modulated w/ pressed- and toggle color. More... | |
| final Vec4f | pressedRGBAModulate = new Vec4f(0.70f, 0.70f, 0.70f, 0.8f) |
| Default pressed color-factor (darker and slightly transparent), modulates base-color. More... | |
| final Vec4f | toggleOnRGBAModulate = new Vec4f(0.83f, 0.83f, 0.83f, 1.0f) |
| Default toggle color-factor (darker), modulates base-color. More... | |
| final Vec4f | toggleOffRGBAModulate = new Vec4f(1.00f, 1.00f, 1.00f, 1.0f) |
| Default toggle color-factor (original), modulates base-color. More... | |
| final Vec4f | activeRGBAModulate = new Vec4f(0.25f, 0.25f, 0.25f, 1.0f) |
| Default active color-factor (dark), modulates base-color. More... | |
| boolean | activeRGBAModulateOn = false |
Static Protected Attributes inherited from com.jogamp.graph.ui.Shape | |
| static final boolean | DEBUG_DRAW = false |
A GraphUI text labeled BaseButton GraphShape.
GraphUI is GPU based and resolution independent.
This button is rendered with a round oval shape. To render it rectangular, setCorner(float) to zero.
Definition at line 61 of file Button.java.
| com.jogamp.graph.ui.shapes.Button.Button | ( | final int | renderModes, |
| final Font | labelFont, | ||
| final CharSequence | labelText, | ||
| final float | width, | ||
| final float | height | ||
| ) |
Create a text labeled button Graph based GLRegion UI Shape.
Sets the Z-axis offset to a default smallest resolvable Z separation rounded value 0.000153 at 16-bits depth buffer, -1 z-distance and 0.1 z-near, used to separate the BaseButton from the Label.
| renderModes | Graph's Region render modes, see create(..). |
| labelFont | Font for the label |
| labelText | the label text |
| width | width of the button |
| height | height of the button |
Definition at line 101 of file Button.java.
| com.jogamp.graph.ui.shapes.Button.Button | ( | final int | renderModes, |
| final Font | labelFont, | ||
| final CharSequence | labelText, | ||
| final float | width, | ||
| final float | height, | ||
| final float | zOffset | ||
| ) |
Create a text labeled button Graph based GLRegion UI Shape.
| renderModes | Graph's Region render modes, see create(..). |
| labelFont | Font for the label |
| labelText | the label text |
| width | width of the button |
| height | height of the button |
| zOffset | the Z-axis offset, used to separate the BaseButton from the Label |
Definition at line 116 of file Button.java.
| com.jogamp.graph.ui.shapes.Button.Button | ( | final int | renderModes, |
| final Font | labelFont, | ||
| final CharSequence | labelTextOff, | ||
| final CharSequence | labelTextOn, | ||
| final float | width, | ||
| final float | height, | ||
| final float | zOffset | ||
| ) |
Create a text labeled button Graph based GLRegion UI Shape.
If labelTextOn is not null, constructor enables toggle-able mode to automatically switch the labels depending on isToggleOn().
| renderModes | Graph's Region render modes, see create(..). |
| labelFont | Font for the label |
| labelTextOff | the label text of the toggle-off state (current at creation), see isToggleOn() |
| labelTextOn | optional label text of the toggle-on state, see isToggleOn(). If not null, enables toggle-able mode. |
| width | width of the button |
| height | height of the button |
| zOffset | the Z-axis offset, used to separate the BaseButton from the Label |
Definition at line 136 of file Button.java.
|
protected |
Reimplemented from com.jogamp.graph.ui.shapes.BaseButton.
Definition at line 179 of file Button.java.
| void com.jogamp.graph.ui.shapes.Button.draw | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer | ||
| ) |
Renders the shape.
applyMatToMv(PMVMatrix4f) is expected to be completed beforehand.
| gl | the current GL object |
| renderer | RegionRenderer which might be used for Graph Curve Rendering, also source of RegionRenderer#getMatrix() and RegionRenderer#getViewport(). |
Reimplemented from com.jogamp.graph.ui.Shape.
Definition at line 169 of file Button.java.
| final Vec2f com.jogamp.graph.ui.shapes.Button.getFixedLabelSize | ( | ) |
Returns the current fixed label font size, see {@Link setFixedLabelSize(Vec2f)} and setSpacing(Vec2f, Vec2f).
Definition at line 263 of file Button.java.
| Font com.jogamp.graph.ui.shapes.Button.getFont | ( | ) |
Returns the label Font.
Definition at line 163 of file Button.java.
| final Vec4f com.jogamp.graph.ui.shapes.Button.getLabelColor | ( | ) |
Returns the label color.
Definition at line 328 of file Button.java.
| float com.jogamp.graph.ui.shapes.Button.getLabelZOffset | ( | ) |
Definition at line 233 of file Button.java.
| final Vec2f com.jogamp.graph.ui.shapes.Button.getSpacing | ( | ) |
Returns the current spacing size, see {@Link setSpacing(Vec2f)} and setSpacing(Vec2f, Vec2f).
Definition at line 291 of file Button.java.
| String com.jogamp.graph.ui.shapes.Button.getSubString | ( | ) |
Reimplemented from com.jogamp.graph.ui.shapes.BaseButton.
Definition at line 387 of file Button.java.
| CharSequence com.jogamp.graph.ui.shapes.Button.getText | ( | ) |
Returns the text of the current label.
Definition at line 166 of file Button.java.
| final Button com.jogamp.graph.ui.shapes.Button.setFixedLabelSize | ( | final float | w, |
| final float | h | ||
| ) |
Sets fixed label font size clipped to range [0 .
. 1], defaults to 0, 0.
Use w=0, h=1 when using single symbols from fixed sized symbol fonts! Use setSpacing(Vec2f, Vec2f) to also set spacing.
The fixed label font size is used as the denominator when scaling.max(fixedLabelSize, fontLabelSize), hence reasonable values are either 1 to enable using the given font-size for the axis or 0 to scale up/down the font to match the button box less spacing for the axis.
Definition at line 279 of file Button.java.
Sets the label font.
Definition at line 353 of file Button.java.
| final Button com.jogamp.graph.ui.shapes.Button.setLabelColor | ( | final float | r, |
| final float | g, | ||
| final float | b, | ||
| final float | a | ||
| ) |
Sets the label color, consider using alpha 1.
Definition at line 343 of file Button.java.
Sets the label color, consider using alpha 1.
Definition at line 333 of file Button.java.
| Button com.jogamp.graph.ui.shapes.Button.setLabelZOffset | ( | final float | v | ) |
Set the Z-axis offset to the given value, used to separate the BaseButton from the Label.
| v | the zoffset |
Definition at line 242 of file Button.java.
| Button com.jogamp.graph.ui.shapes.Button.setLabelZOffset | ( | final int | zBits, |
| final float | zDist, | ||
| final float | zNear | ||
| ) |
Set the Z-axis offset to the smallest resolvable Z separation at the given range, used to separate the BaseButton from the Label.
| zBits | number of bits of Z precision, i.e. z-buffer depth |
| zDist | distance from the eye to the object |
| zNear | distance from eye to near clip plane |
Definition at line 258 of file Button.java.
| final Button com.jogamp.graph.ui.shapes.Button.setSpacing | ( | final float | spacingX, |
| final float | spacingY | ||
| ) |
Sets spacing in percent of text label, clipped to range [0 .
. 1].
| spacingX | spacing in percent on X, default is DEFAULT_SPACING_X |
| spacingY | spacing in percent on Y, default is DEFAULT_SPACING_Y |
Definition at line 300 of file Button.java.
Sets spacing in percent of text label, clipped to range [0 .
. 1].
| spacingX | spacing in percent on X, default is DEFAULT_SPACING_X |
| spacingY | spacing in percent on Y, default is DEFAULT_SPACING_Y |
Definition at line 313 of file Button.java.
| final Button com.jogamp.graph.ui.shapes.Button.setSpacing | ( | final Vec2f | spacing, |
| final Vec2f | fixedLabelSize | ||
| ) |
Sets spacing setSpacing(Vec2f) and fixed label font size setFixedLabelSize(Vec2f) for convenience.
Definition at line 321 of file Button.java.
| final Button com.jogamp.graph.ui.shapes.Button.setText | ( | final CharSequence | labelText | ) |
Sets the current label text.
Definition at line 368 of file Button.java.
| final Button com.jogamp.graph.ui.shapes.Button.setText | ( | final Font | labelFont, |
| final CharSequence | labelText | ||
| ) |
Sets the current label text.
Definition at line 377 of file Button.java.
|
protected |
Reimplemented from com.jogamp.graph.ui.Shape.
Definition at line 151 of file Button.java.
|
static |
Default Z-axis offset, using the smallest resolvable Z separation rounded value {@value} at 16-bits depth buffer, -1 z-distance and 0.1 z-near, used to separate the BaseButton from the Label.
FloatUtil#getZBufferEpsilon(int, float, float)
1.5256461E-4 = 16 zBits, -0.2 zDist, 0.1 zNear 6.1033297E-6 = 16 zBits, -1.0 zDist, 0.1 zNear
Definition at line 79 of file Button.java.
|
static |
{@value}
Definition at line 63 of file Button.java.
|
static |
{@value}
Definition at line 65 of file Button.java.