|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectexe.GAIGSprimitiveCollection
public class GAIGSprimitiveCollection
GAIGSprimitiveCollection provides the ability to draw 2D graphics for use in visualizations.
This class supports a variety of 2D graphics primitives, including lines, polygons, circles, ellipises, etc.
Creation of the primitives adheres to the other GAIGS classes and colors are specified with the standard color string.
| Nested Class Summary | |
|---|---|
protected class |
GAIGSprimitiveCollection.Circle
|
protected class |
GAIGSprimitiveCollection.Ellipse
|
protected class |
GAIGSprimitiveCollection.Polygon
|
protected static interface |
GAIGSprimitiveCollection.Primitive
|
protected class |
GAIGSprimitiveCollection.StraightLine
|
| Field Summary | |
|---|---|
int |
LINE_WIDTH
|
protected java.lang.String |
name
The Name of the collection of graphical primitives |
protected java.util.ArrayList<GAIGSprimitiveCollection.Primitive> |
primitives
The Current collection of graphical primitives |
double |
TEXT_HEIGHT
|
| Fields inherited from interface exe.GAIGSdatastr |
|---|
DEFAULT_COLOR, DEFAULT_FONT_SIZE, DEFAULT_NAME, DEFAULT_X1, DEFAULT_X2, DEFAULT_Y1, DEFAULT_Y2 |
| Constructor Summary | |
|---|---|
GAIGSprimitiveCollection()
Creates an empty primitive collection with no name |
|
GAIGSprimitiveCollection(java.lang.String name)
Creates an empty primitive collection with the specified name |
|
| Method Summary | |
|---|---|
void |
addArrow(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double headSize)
Adds a line to the primitive collection ending in an arrow |
void |
addArrow(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double headSize,
double textHeight,
int lineWidth)
Adds a line to the primitive collection ending in an arrow |
void |
addCircle(double cx,
double cy,
double r,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText)
Adds a circle to the primitive collection |
void |
addCircle(double cx,
double cy,
double r,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText,
double textHeight,
int lineWidth)
Adds a circle to the primitive collection |
void |
addDashedLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double dashSize)
Adds a line to the primitive collection |
void |
addDashedLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double dashSize,
double textHeight,
int lineWidth)
Adds a line to the primitive collection |
void |
addEllipse(double x,
double y,
double stAngle,
double endAngle,
double xR,
double yR,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label)
Adds an ellipse to the primitive collection. |
void |
addEllipse(double x,
double y,
double stAngle,
double endAngle,
double xR,
double yR,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double textHeight,
int lineWidth)
Adds an ellipse to the primitive collection. |
void |
addLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label)
Adds a line to the primitive collection |
void |
addLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double textHeight,
int lineWidth)
Adds a line to the primitive collection |
void |
addPolygon(int nSides,
double[] ptsX,
double[] ptsY,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText)
Adds a polygon to the primitive collection |
void |
addPolygon(int nSides,
double[] ptsX,
double[] ptsY,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText,
double textHeight,
int lineWidth)
Adds a polygon to the primitive collection |
void |
clearPrimitives()
Removes all primitives from the collection |
java.lang.String |
getName()
Returns the name of the primitive collection |
void |
setName(java.lang.String name)
Sets the name of the primitive collection |
java.lang.String |
toXML()
Creates and Returns the GAIGS XML code for the current state of the primitive collection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final double TEXT_HEIGHT
public final int LINE_WIDTH
protected java.util.ArrayList<GAIGSprimitiveCollection.Primitive> primitives
protected java.lang.String name
| Constructor Detail |
|---|
public GAIGSprimitiveCollection()
public GAIGSprimitiveCollection(java.lang.String name)
| Method Detail |
|---|
public void setName(java.lang.String name)
setName in interface GAIGSdatastrname - The name of the collectionpublic java.lang.String getName()
getName in interface GAIGSdatastrpublic java.lang.String toXML()
toXML in interface GAIGSdatastrpublic void clearPrimitives()
public void addCircle(double cx,
double cy,
double r,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText,
double textHeight,
int lineWidth)
cx - The center x coordinate of the circlecy - The center y coordinate of the circler - The radius of the circlefillColor - The internal color of the circle (use an empty string for no fill color)outlineColor - The color of the circle outlinelabelColor - The color of the text in the circle labellabelText - The text to be drawn in the center of the circletextHeight - The Height of the text in the labellineWidth - The thickness of the outline of the circle
public void addPolygon(int nSides,
double[] ptsX,
double[] ptsY,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText,
double textHeight,
int lineWidth)
nSides - The number of sides to the polygonptsX - Array containing the x coordinate values for the polygonotsY - Array containing the y coordinate values for the polygonfillColor - The internal color of the polygon (use an empty string for no fill color)outlineColor - The color of the circle polygonlabelColor - The color of the text in the circle labellabelText - The text to be drawn in the center of the circlelineWidth - The thickness of the outline of the polygon
public void addLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double textHeight,
int lineWidth)
x - Array of 2 containing the x coordinates for the start point and end pointy - Array of 2 containing the y coordinates for the start point and end pointcolor - The color of the linelcolor - The color of the text in the labellabel - The text to printed near the linetextHeight - The Height of the text in the labellineWidth - The thickness of the line
public void addDashedLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double dashSize,
double textHeight,
int lineWidth)
x - Array of 2 containing the x coordinates for the start point and end pointy - Array of 2 containing the y coordinates for the start point and end pointcolor - The color of the linelcolor - The color of the text in the labellabel - The text to printed near the linedashSize - The length of the dash in the linetextHeight - The Height of the text in the labellineWidth - The thickness of the line dashes
public void addArrow(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double headSize,
double textHeight,
int lineWidth)
x - Array of 2 containing the x coordinates for the start point and end pointy - Array of 2 containing the y coordinates for the start point and end pointcolor - The color of the linelcolor - The color of the text in the labellabel - The text to printed near the lineheadSize - The size of the arrow headtextHeight - The Height of the text in the labellineWidth - The thickness of the line
public void addEllipse(double x,
double y,
double stAngle,
double endAngle,
double xR,
double yR,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double textHeight,
int lineWidth)
x - The lower right hand x coordinate of the ellipse boundsy - The lower right hand y coordinate of the ellipse boundsstAngle - The starting angle in radians of the ellipseendAngle - The ending angle in radians of the ellipsexR - The radius value along the x axisyR - The radius value along the y axiscolor - The color of the outline of the ellipselcolor - The color of the text in the labellabel - The text for the label to appear in the center of the ellipsetextHeight - The Height of the text in the labellineWidth - The width of the outline of the circle
public void addCircle(double cx,
double cy,
double r,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText)
cx - The center x coordinate of the circlecy - The center y coordinate of the circler - The radius of the circlefillColor - The internal color of the circle (use an empty string for no fill color)outlineColor - The color of the circle outlinelabelColor - The color of the text in the circle labellabelText - The text to be drawn in the center of the circle
public void addPolygon(int nSides,
double[] ptsX,
double[] ptsY,
java.lang.String fillColor,
java.lang.String outlineColor,
java.lang.String labelColor,
java.lang.String labelText)
nSides - The number of sides to the polygonptsX - Array containing the x coordinate values for the polygonotsY - Array containing the y coordinate values for the polygonfillColor - The internal color of the polygon (use an empty string for no fill color)outlineColor - The color of the circle polygonlabelColor - The color of the text in the circle labellabelText - The text to be drawn in the center of the circle
public void addLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label)
x - Array of 2 containing the x coordinates for the start point and end pointy - Array of 2 containing the y coordinates for the start point and end pointcolor - The color of the linelcolor - The color of the text in the labellabel - The text to printed near the line
public void addDashedLine(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double dashSize)
x - Array of 2 containing the x coordinates for the start point and end pointy - Array of 2 containing the y coordinates for the start point and end pointcolor - The color of the linelcolor - The color of the text in the labellabel - The text to printed near the linedashSize - The length of the dash in the line
public void addArrow(double[] x,
double[] y,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label,
double headSize)
x - Array of 2 containing the x coordinates for the start point and end pointy - Array of 2 containing the y coordinates for the start point and end pointcolor - The color of the linelcolor - The color of the text in the labellabel - The text to printed near the lineheadSize - The size of the arrow head
public void addEllipse(double x,
double y,
double stAngle,
double endAngle,
double xR,
double yR,
java.lang.String color,
java.lang.String lcolor,
java.lang.String label)
x - The lower right hand x coordinate of the ellipse boundsy - The lower right hand y coordinate of the ellipse boundsstAngle - The starting angle in radians of the ellipseendAngle - The ending angle in radians of the ellipsexR - The radius value along the x axisyR - The radius value along the y axiscolor - The color of the outline of the ellipselcolor - The color of the text in the labellabel - The text for the label to appear in the center of the ellipsetextHeight - The Height of the text in the label
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||