ballwar.model.paint
Class RectanglePaintStrategy
java.lang.Object
   ballwar.model.paint.APaintStrategy
ballwar.model.paint.APaintStrategy
       ballwar.model.paint.ShapePaintStrategy
ballwar.model.paint.ShapePaintStrategy
           ballwar.model.paint.RectanglePaintStrategy
ballwar.model.paint.RectanglePaintStrategy
- All Implemented Interfaces: 
- IPaintStrategy
- public class RectanglePaintStrategy 
- extends ShapePaintStrategy
Concrete paint strategy that paints a rectangular shape
 scaled to the size of the ball.
 
 
 
| Constructor Summary | 
| RectanglePaintStrategy()No-parameter constructor that instantiates the 
 AffineTransform for internal use plus defines a 
 prototype Rectangle of a width = 8/3 and height = 2/3
 which is an average radius of 1.
 | 
| RectanglePaintStrategy(AffineTransform at,
                       double x,
                       double y,
                       double width,
                       double height)Constructor that takes an external AffineTransform for internal use
 and a Rectangle centered at (x, y) with the given half-width 
 and half-height (= x-radius and y-radius).
 | 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
RectanglePaintStrategy
public RectanglePaintStrategy()
- No-parameter constructor that instantiates the 
 AffineTransform for internal use plus defines a 
 prototype Rectangle of a width = 8/3 and height = 2/3
 which is an average radius of 1.
 
RectanglePaintStrategy
public RectanglePaintStrategy(AffineTransform at,
                              double x,
                              double y,
                              double width,
                              double height)
- Constructor that takes an external AffineTransform for internal use
 and a Rectangle centered at (x, y) with the given half-width 
 and half-height (= x-radius and y-radius).
 
- Parameters:
- at- The AffineTransform to use
- x- The x-coordinate of the center of the prototype rectangle
- y- The y-coordinate of the center of the prototype rectangle
- width- The half-width of the rectangle, i.e. the width as measured from the center.
- height- The half-hieght of the rectangle, i.e. the height as measured from the center.