Package mgui.geometry
Class Text2D
java.lang.Object
mgui.geometry.Shape2D
mgui.geometry.Text2D
public class Text2D extends Shape2D
Represents a character string with 2D geometry.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGN_CENTER
static int
ALIGN_LEFT
static int
ALIGN_RIGHT
protected Rect2D
bounds
protected java.lang.String
textStr
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description java.lang.Object
clone()
Rect2D
getBounds()
Returns a rectangle which bounds this 2D shapejava.lang.String
getText()
org.jogamp.vecmath.Point2f
getVertex(int i)
java.util.ArrayList<org.jogamp.vecmath.Point2f>
getVertices()
void
setBounds(Rect2D bounds)
void
setText(java.lang.String text)
void
setVertices(java.util.ArrayList<org.jogamp.vecmath.Point2f> vertices)
Methods inherited from class mgui.geometry.Shape2D
contains, getCenterPt, getCoords, getDTD, getLocalName, getProximity, getProximityPoint, getShortXML, getSize, getVertices, getXML, getXML, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, setCoords, setVertices, transform, transform, writeXML, writeXML, writeXML
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
textStr
protected java.lang.String textStr -
bounds
-
ALIGN_CENTER
public static final int ALIGN_CENTER- See Also:
- Constant Field Values
-
ALIGN_LEFT
public static final int ALIGN_LEFT- See Also:
- Constant Field Values
-
ALIGN_RIGHT
public static final int ALIGN_RIGHT- See Also:
- Constant Field Values
-
-
Constructor Details
-
Text2D
public Text2D() -
Text2D
-
Text2D
public Text2D(java.lang.String text, org.jogamp.vecmath.Point2f pt1, org.jogamp.vecmath.Point2f pt2)
-
-
Method Details
-
getVertices
public java.util.ArrayList<org.jogamp.vecmath.Point2f> getVertices()- Specified by:
getVertices
in classShape2D
-
setVertices
public void setVertices(java.util.ArrayList<org.jogamp.vecmath.Point2f> vertices)- Specified by:
setVertices
in classShape2D
-
getVertex
public org.jogamp.vecmath.Point2f getVertex(int i) -
getText
public java.lang.String getText() -
setText
public void setText(java.lang.String text) -
getBounds
Description copied from class:Shape2D
Returns a rectangle which bounds this 2D shape -
setBounds
-
clone
public java.lang.Object clone()
-