Package com.jogamp.graph.ui.shapes
Class Button
- java.lang.Object
-
- com.jogamp.graph.ui.Shape
-
- com.jogamp.graph.ui.GraphShape
-
- com.jogamp.graph.ui.shapes.BaseButton
-
- com.jogamp.graph.ui.shapes.Button
-
public class Button extends BaseButton
A GraphUI text labeledBaseButton
GraphShape
GraphUI is GPU based and resolution independent.
This button is rendered with a round oval shape. To render it rectangular,
BaseButton.setCorner(float)
to zero.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jogamp.graph.ui.Shape
Shape.EventInfo, Shape.Listener, Shape.ListenerBool, Shape.MouseGestureAdapter, Shape.MouseGestureListener, Shape.Visitor1, Shape.Visitor2
-
-
Field Summary
Fields Modifier and Type Field Description static float
DEFAULT_SPACING_X
0.11999999731779099fstatic float
DEFAULT_SPACING_Y
0.41999998688697815f-
Fields inherited from class com.jogamp.graph.ui.shapes.BaseButton
PERP_CORNER, ROUND_CORNER
-
Fields inherited from class com.jogamp.graph.ui.Shape
ZAscendingComparator
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(GL2ES2 gl, RegionRenderer renderer, int[] sampleCount)
Renders the shape.Font
getFont()
Vec4f
getLabelColor()
float
getLabelZOffset()
String
getLaben()
float
getSpacingX()
float
getSpacingY()
String
getSubString()
Button
setFont(Font labelFont)
Button
setLabel(Font labelFont, String labelText)
Button
setLabel(String labelText)
Button
setLabelColor(float r, float g, float b)
Button
setLabelZOffset(float v)
Button
setSpacing(float spacingX, float spacingY)
In percent of text label-
Methods inherited from class com.jogamp.graph.ui.shapes.BaseButton
getCorner, getHeight, getWidth, setCorner, setSize
-
Methods inherited from class com.jogamp.graph.ui.GraphShape
getQuality, getRenderModes, getSharpness, hasColorChannel, setQuality, setSharpness, setTextureUnit
-
Methods inherited from class com.jogamp.graph.ui.Shape
addMouseListener, clear, destroy, drawToSelect, getBorderColor, getBorderThickness, getBounds, getBounds, getColor, getName, getPadding, getPixelPerShapeUnit, getPixelPerShapeUnit, getPosition, getRotation, getRotationPivot, getScale, getScaledHeight, getScaledWidth, getSurfacePort, getSurfaceSize, getSurfaceSize, getSurfaceSize, hasBorder, hasPadding, isDraggable, isEnabled, isInteractive, isPressed, isResizable, isToggleable, isToggleOn, markShapeDirty, markStateDirty, move, move, moveTo, moveTo, onClicked, onInit, onMove, onToggle, removeMouseListener, scale, setBorder, setBorderColor, setBorderColor, setColor, setColor, setDragAndResizeable, setDraggable, setEnabled, setInteractive, setName, setPaddding, setPressed, setPressedColorMod, setResizable, setRotationPivot, setRotationPivot, setScale, setToggle, setToggleable, setToggleOffColorMod, setToggleOnColorMod, setTransform, shapeToWinCoord, shapeToWinCoord, shapeToWinCoord, toggle, toString, validate, validate, winToShapeCoord, winToShapeCoord, winToShapeCoord
-
-
-
-
Field Detail
-
DEFAULT_SPACING_X
public static final float DEFAULT_SPACING_X
0.11999999731779099f- See Also:
- Constant Field Values
-
DEFAULT_SPACING_Y
public static final float DEFAULT_SPACING_Y
0.41999998688697815f- See Also:
- Constant Field Values
-
-
Method Detail
-
getFont
public Font getFont()
-
getLaben
public String getLaben()
-
draw
public void draw(GL2ES2 gl, RegionRenderer renderer, int[] sampleCount)
Description copied from class:Shape
Renders the shape.Shape.setTransform(PMVMatrix)
is expected to be completed beforehand.- Overrides:
draw
in classShape
- Parameters:
gl
- the current GL objectrenderer
-RegionRenderer
which might be used for Graph Curve Rendering, also source ofRegionRenderer.getMatrix()
andRegionRenderer.getViewport()
.sampleCount
- sample count if used by Graph renderModes
-
getLabelZOffset
public float getLabelZOffset()
-
setLabelZOffset
public Button setLabelZOffset(float v)
-
getSpacingX
public final float getSpacingX()
-
getSpacingY
public final float getSpacingY()
-
setSpacing
public final Button setSpacing(float spacingX, float spacingY)
In percent of text label- Parameters:
spacingX
- spacing in percent on X, default isDEFAULT_SPACING_X
spacingY
- spacing in percent on Y, default isDEFAULT_SPACING_Y
-
getLabelColor
public final Vec4f getLabelColor()
-
setLabelColor
public final Button setLabelColor(float r, float g, float b)
-
getSubString
public String getSubString()
- Overrides:
getSubString
in classBaseButton
-
-