|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.util.ShapeFactory
public class ShapeFactory
This class contains some useful static factory methods for generating shapes.
Method Summary | |
---|---|
static Polygon |
createDiamond(double xCentre,
double yCentre,
double pointSize)
Deprecated. in favour of createDiamond2D. This method will be removed some time after release 2.9.2. |
static Shape |
createDiamond2D(double xCentre,
double yCentre,
double pointSize)
Creates a diamond (actually, a square rotated by 45 degrees) at the given position |
static Polygon |
createDownTriangle(double xCentre,
double yCentre,
double side)
Deprecated. in favour of createDownTriangle2D. This method will be removed some time after release 2.9.2. |
static Shape |
createDownTriangle2D(double xCentre,
double yCentre,
double side)
Generates a triangle with one horizontal side and a vertex pointing downwards. |
static Polygon |
createUpTriangle(double xCentre,
double yCentre,
double side)
Deprecated. in favour of createUpTriangle2D. This method will be removed some time after release 2.9.2. |
static Shape |
createUpTriangle2D(double xCentre,
double yCentre,
double side)
Generates an equilateral triangle with one horizontal side and a vertex pointing upwards. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Polygon createDownTriangle(double xCentre, double yCentre, double side)
public static Shape createDownTriangle2D(double xCentre, double yCentre, double side)
Wikipedia says: A median of a triangle is a straight line through a vertex and the midpoint of the opposite side, and divides the triangle into two equal areas. The three medians intersect in a single point, the triangle's centroid. This is also the triangle's center of gravity: if the triangle were made out of wood, say, you could balance it on its centroid, or on any line through the centroid. The centroid cuts every median in the ratio 2:1, i.e. the distance between a vertex and the centroid is twice as large as the distance between the centroid and the midpoint of the opposite side.
xCentre
- - the x coordinate of the centroid of the generated triangleyCentre
- - the y coordinate of the centroid of the generated triangleside
- - the length of the side
java.awt.Polygon
representing the Trianglepublic static Polygon createUpTriangle(double xCentre, double yCentre, double side)
public static Shape createUpTriangle2D(double xCentre, double yCentre, double side)
Wikipedia says: A median of a triangle is a straight line through a vertex and the midpoint of the opposite side, and divides the triangle into two equal areas. The three medians intersect in a single point, the triangle's centroid. This is also the triangle's center of gravity: if the triangle were made out of wood, say, you could balance it on its centroid, or on any line through the centroid. The centroid cuts every median in the ratio 2:1, i.e. the distance between a vertex and the centroid is twice as large as the distance between the centroid and the midpoint of the opposite side.
xCentre
- - the x coordinate of the centroid of the generated triangleyCentre
- - the y coordinate of the centroid of the generated triangleside
- - the length of the side
java.awt.Polygon
representing the Trianglepublic static Polygon createDiamond(double xCentre, double yCentre, double pointSize)
public static Shape createDiamond2D(double xCentre, double yCentre, double pointSize)
xCentre
- the x coordinate of the centre of the shapeyCentre
- the y coordinate of the centre of the shapepointSize
- the length of the side of the square
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |