public class GShapeFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
static Shape |
createCircle(double diameter)
Create a circle.
|
static Shape |
createDiagonalCross(double length,
double thickness)
Create a diagonal cross.
|
static Shape |
createDiamond(double size)
Create a diamond.
|
static Shape |
createDownTriangle(double size)
Create an down triangle.
|
static Shape |
createEllipse(double width,
double height)
Create an ellipse.
|
static Shape |
createRectangle(double width,
double height)
Create a rectangle.
|
static Shape |
createRegularCross(double length,
double thickness)
Create a cross.
|
static Shape |
createSquare(double size)
Create a square.
|
static Shape |
createUpTriangle(double size)
Create an up triangle.
|
public static Shape createCircle(double diameter)
diameter - diameter of the circle.public static Shape createEllipse(double width, double height)
width - width of the ellipse.height - height of the ellimse.public static Shape createSquare(double size)
size - length of the side of the square.public static Shape createRectangle(double width, double height)
width - width size.height - height size.public static Shape createRegularCross(double length, double thickness)
length - the length of each 'arm'.thickness - the thickness.public static Shape createDiagonalCross(double length, double thickness)
length - the length of each 'arm'.thickness - the thickness.public static Shape createDiamond(double size)
size - half the height of the diamond.public static Shape createUpTriangle(double size)
size - half the height of the trianglepublic static Shape createDownTriangle(double size)
size - half the height of the triangleCopyright © 2024. All rights reserved.