ballwar.model.paint
Class EllipseShapeFactory
java.lang.Object
ballwar.model.paint.EllipseShapeFactory
- All Implemented Interfaces:
- IShapeFactory
public class EllipseShapeFactory
- extends Object
- implements IShapeFactory
Concrete shape factory that instantiates Ellipse2D.Double shapes.
Method Summary |
Shape |
makeShape(double x,
double y,
double xScale,
double yScale)
Instantiates an ellipse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Singleton
public static final EllipseShapeFactory Singleton
- Singleton pattern
EllipseShapeFactory
private EllipseShapeFactory()
makeShape
public Shape makeShape(double x,
double y,
double xScale,
double yScale)
- Instantiates an ellipse
- Specified by:
makeShape
in interface IShapeFactory
- Parameters:
x
- x-coordinate of the center of the ellipsey
- y-coordinate of the center of the ellipsexScale
- The x-radius of the ellipseyScale
- The y-radius of the ellipse
- Returns:
- An Ellipse2D.Double object.