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 intALIGN_CENTERstatic intALIGN_LEFTstatic intALIGN_RIGHTprotected Rect2Dboundsprotected java.lang.StringtextStr -
Constructor Summary
-
Method Summary
Modifier and Type Method Description java.lang.Objectclone()Rect2DgetBounds()Returns a rectangle which bounds this 2D shapejava.lang.StringgetText()org.jogamp.vecmath.Point2fgetVertex(int i)java.util.ArrayList<org.jogamp.vecmath.Point2f>getVertices()voidsetBounds(Rect2D bounds)voidsetText(java.lang.String text)voidsetVertices(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, writeXMLMethods 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:
getVerticesin classShape2D
-
setVertices
public void setVertices(java.util.ArrayList<org.jogamp.vecmath.Point2f> vertices)- Specified by:
setVerticesin 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:Shape2DReturns a rectangle which bounds this 2D shape -
setBounds
-
clone
public java.lang.Object clone()
-