ballwar.model.paint
Class ShapePaintStrategy
java.lang.Object
   ballwar.model.paint.APaintStrategy
ballwar.model.paint.APaintStrategy
       ballwar.model.paint.ShapePaintStrategy
ballwar.model.paint.ShapePaintStrategy
- All Implemented Interfaces: 
- IPaintStrategy
- Direct Known Subclasses: 
- EllipsePaintStrategy, Fish1PaintStrategy, Fish2PaintStrategy, RectanglePaintStrategy
- public class ShapePaintStrategy 
- extends APaintStrategy
Concrete class that defines invariant painting behaviors for all
 Shape subclasses. 
 Note: This cannot be directly instantiated by the BallWar system 
 because it does not have a no-parameter constructor.
| Field Summary | 
| private  Shape | shapeThe Shape to be painted
 | 
 
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
shape
private Shape shape
- The Shape to be painted
 
 
ShapePaintStrategy
public ShapePaintStrategy(Shape shape)
- Constructor that allocates a new AffineTransform for internal use.
 
- Parameters:
- shape- The Shape to be painted.
 
ShapePaintStrategy
public ShapePaintStrategy(AffineTransform at,
                          Shape shape)
- Constructor that uses a supplied AffineTransform for internal use.
 
- Parameters:
- at- The AffineTransform to use
- shape- The Shape to be painted.
 
paintXfrm
public void paintXfrm(Graphics g,
                      Ball host,
                      AffineTransform at)
- Paints the shape on the given Graphics context using the 
 supplied AffineTransform. Called by the inherited paint method.
 
- 
- Parameters:
- g- The Graphics context to paint upon.
- host- The host Ball
- at- The AffineTransform to use