Package com.jogamp.graph.ui.shapes
Class BaseButton
- java.lang.Object
-
- com.jogamp.graph.ui.Shape
-
- com.jogamp.graph.ui.GraphShape
-
- com.jogamp.graph.ui.shapes.BaseButton
-
- Direct Known Subclasses:
Button
,TexSeqButton
public class BaseButton extends GraphShape
An abstract GraphUI base filled buttonGraphShape
, usually used as a backdrop or base shape for more informative button types.GraphUI is GPU based and resolution independent.
This button is rendered with a round oval shape
by default
, but can be set torectangular shape
.
-
-
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
PERP_CORNER
Perpendicular corner
for a rectangular shape, value 0.0f.static float
ROUND_CORNER
Round corner
, value 1.0f.-
Fields inherited from class com.jogamp.graph.ui.Shape
ZAscendingComparator
-
-
Constructor Summary
Constructors Constructor Description BaseButton(int renderModes, float width, float height)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getCorner()
float
getHeight()
String
getSubString()
float
getWidth()
BaseButton
setCorner(float corner)
Set corner size with range [0.01 ..BaseButton
setSize(float width, float height)
-
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, draw, 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
-
ROUND_CORNER
public static final float ROUND_CORNER
Round corner
, value 1.0f. This is the default value.- See Also:
- Constant Field Values
-
PERP_CORNER
public static final float PERP_CORNER
Perpendicular corner
for a rectangular shape, value 0.0f.- See Also:
- Constant Field Values
-
-
Method Detail
-
getWidth
public final float getWidth()
-
getHeight
public final float getHeight()
-
getCorner
public final float getCorner()
-
setCorner
public BaseButton setCorner(float corner)
Set corner size with range [0.01 .. 1.00] for round corners or `zero` for perpendicular corners., default is
round corner
, alternative aperpendicular corner
for a rectangular shape is available.- See Also:
ROUND_CORNER
,PERP_CORNER
-
setSize
public BaseButton setSize(float width, float height)
-
getSubString
public String getSubString()
- Overrides:
getSubString
in classShape
-
-