|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcox.jmatt.java.MathTools.graphing.xml.RenderableXML
cox.jmatt.java.MathTools.graphing.xml.PolygonXML
public class PolygonXML
PolygonXML
contains a <Polygon> tag with the usual attributes along with one mandatory child tag. The <Vertices> tag contains the
'closed=' attribute along with the vertices, if any, expressed as a space-separated String. Any parameters added will follow.
Field Summary |
---|
Fields inherited from class cox.jmatt.java.MathTools.graphing.xml.RenderableXML |
---|
myID, myName, myParams, myType |
Constructor Summary | |
---|---|
PolygonXML()
Constructor for an unnamed Polygon. |
|
PolygonXML(java.lang.String pName)
Build a named Polygon. |
Method Summary | |
---|---|
Polygon |
addVertex(double pX,
double pY)
Add a vertex to the Polygon. |
java.lang.Object |
render(java.lang.Object pContext)
Rendering Polygon yields a <Polygon> tag with the usual 'id=', 'name=' and 'type=' attributes. |
void |
setClosed(boolean pClosed)
Set the closedness of the Polygon. |
Methods inherited from class cox.jmatt.java.MathTools.graphing.xml.RenderableXML |
---|
setID, setParameter, setType, testCondition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cox.jmatt.java.MathTools.graphing.Renderable |
---|
setParameter, setType, testCondition |
Constructor Detail |
---|
public PolygonXML()
public PolygonXML(java.lang.String pName)
Method Detail |
---|
public Polygon addVertex(double pX, double pY)
addVertex
in interface Polygon
pX
- The X-coordinate of the point.pY
- The Y-coordinate of the point.
public void setClosed(boolean pClosed)
setClosed
in interface Polygon
pClosed
- true to 'close' the Polygon explicitly, false to leave it 'open'.public java.lang.Object render(java.lang.Object pContext)
Polygon
yields a <Polygon> tag with the usual 'id=', 'name=' and 'type=' attributes. Vertices are represented as a space-separated
String inside a <Vertices> child tag. The closure of the Polygon is a 'closed=' attribute on the Vertices tag. Any parameters will follow.
render
in interface Renderable
render
in class RenderableXML
pContext
- The Context Object to be used for rendering.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |