Package com.jogamp.graph.ui.shapes
Class ImageButton
- java.lang.Object
-
- com.jogamp.graph.ui.Shape
-
- com.jogamp.graph.ui.GraphShape
-
- com.jogamp.graph.ui.shapes.BaseButton
-
- com.jogamp.graph.ui.shapes.TexSeqButton
-
- com.jogamp.graph.ui.shapes.ImageButton
-
public class ImageButton extends TexSeqButton
A GraphUIImageSequencebasedTexSeqButtonGraphShape.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.Default colors (toggle-off is full color): - non-toggle: 1 * color - pressed: 0.9 * color - toggle-off: 1.0 * color - toggle-on: 0.8 * color
-
-
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 inherited from class com.jogamp.graph.ui.shapes.BaseButton
PERP_CORNER, ROUND_CORNER
-
Fields inherited from class com.jogamp.graph.ui.Shape
ZAscendingComparator
-
-
Constructor Summary
Constructors Constructor Description ImageButton(int renderModes, float width, float height, ImageSequence texSeq)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(GL2ES2 gl, RegionRenderer renderer, int[] sampleCount)Renders the shape.voidsetCurrentIdx(int idx)-
Methods inherited from class com.jogamp.graph.ui.shapes.TexSeqButton
getTextureSequence
-
Methods inherited from class com.jogamp.graph.ui.shapes.BaseButton
getCorner, getHeight, getSubString, 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
-
-
-
-
Constructor Detail
-
ImageButton
public ImageButton(int renderModes, float width, float height, ImageSequence texSeq)
-
-
Method Detail
-
setCurrentIdx
public final void setCurrentIdx(int idx)
-
draw
public void draw(GL2ES2 gl, RegionRenderer renderer, int[] sampleCount)
Description copied from class:ShapeRenders the shape.Shape.setTransform(PMVMatrix)is expected to be completed beforehand.- Overrides:
drawin classShape- Parameters:
gl- the current GL objectrenderer-RegionRendererwhich might be used for Graph Curve Rendering, also source ofRegionRenderer.getMatrix()andRegionRenderer.getViewport().sampleCount- sample count if used by Graph renderModes
-
-