ballwar.model.paint
Class EllipsePaintStrategy

java.lang.Object
  extended by ballwar.model.paint.APaintStrategy
      extended by ballwar.model.paint.ShapePaintStrategy
          extended by ballwar.model.paint.EllipsePaintStrategy
All Implemented Interfaces:
IPaintStrategy

public class EllipsePaintStrategy
extends ShapePaintStrategy

Paint strategy to paint an ellipse shape


Field Summary
 
Fields inherited from class ballwar.model.paint.APaintStrategy
at
 
Fields inherited from interface ballwar.model.IPaintStrategy
NullObject
 
Constructor Summary
EllipsePaintStrategy()
          No parameter constructor that creates a prototype ellipse that has twice the width as height but an average radius of 1.
EllipsePaintStrategy(AffineTransform at, double x, double y, double width, double height)
          Constructor that allows the specification of the location, x-radius and y-radius of the prototype ellipse.
 
Method Summary
 
Methods inherited from class ballwar.model.paint.ShapePaintStrategy
paintXfrm
 
Methods inherited from class ballwar.model.paint.APaintStrategy
init, paint, paintCfg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EllipsePaintStrategy

public EllipsePaintStrategy()
No parameter constructor that creates a prototype ellipse that has twice the width as height but an average radius of 1. An AffineTranform for internal use is instantiated.


EllipsePaintStrategy

public EllipsePaintStrategy(AffineTransform at,
                            double x,
                            double y,
                            double width,
                            double height)
Constructor that allows the specification of the location, x-radius and y-radius of the prototype ellipse. The AffineTransform to use is given.

Parameters:
at - The AffineTransform to use for internal calculations
x - floating point x-coordinate of center of circle
y - floating point y-coordinate of center of circle
width - floating point x-radius of the circle (ellipse)
height - floating point y-radius of the circle (ellipse)