ballwar.model.paint.shape
Class EllipseShapeFactory

java.lang.Object
  extended by ballwar.model.paint.shape.EllipseShapeFactory
All Implemented Interfaces:
IShapeFactory

public class EllipseShapeFactory
extends Object
implements IShapeFactory

Concrete shape factory that instantiates Ellipse2D.Double shapes.


Field Summary
static EllipseShapeFactory Singleton
          Singleton pattern
 
Constructor Summary
private EllipseShapeFactory()
           
 
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
 

Field Detail

Singleton

public static final EllipseShapeFactory Singleton
Singleton pattern

Constructor Detail

EllipseShapeFactory

private EllipseShapeFactory()
Method Detail

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 ellipse
y - y-coordinate of the center of the ellipse
xScale - The x-radius of the ellipse
yScale - The y-radius of the ellipse
Returns:
An Ellipse2D.Double object.