public class RectangleShapeFactory extends java.lang.Object implements IShapeFactory
| Modifier and Type | Field and Description |
|---|---|
static RectangleShapeFactory |
Singleton
Singleton pattern
|
| Modifier | Constructor and Description |
|---|---|
private |
RectangleShapeFactory() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Shape |
makeShape(double x,
double y,
double xScale,
double yScale)
Instantiates a Rectangle2D.Double object at the specified orign and size.
|
public static final RectangleShapeFactory Singleton
public java.awt.Shape makeShape(double x,
double y,
double xScale,
double yScale)
makeShape in interface IShapeFactoryx - The x-coordinate of the center of the prototype rectangley - The y-coordinate of the center of the prototype rectanglexScale - The half-width of the rectangle, i.e. the width as measured from the center.yScale - The half-hieght of the rectangle, i.e. the height as measured from the center.