ballwar.model.paint
Class NiceFishPaintStrategy

java.lang.Object
  extended by ballwar.model.paint.APaintStrategy
      extended by ballwar.model.paint.MultiPaintStrategy
          extended by ballwar.model.paint.NiceFishPaintStrategy
All Implemented Interfaces:
IPaintStrategy

public class NiceFishPaintStrategy
extends MultiPaintStrategy

Subclass of MultiPaintStrategy that uses a SwimFishPaintStrategy and an EllipsePaintStrategy to paint a swimming fish shape that has an eye.


Field Summary
 
Fields inherited from class ballwar.model.paint.APaintStrategy
at
 
Fields inherited from interface ballwar.model.IPaintStrategy
NullObject
 
Constructor Summary
NiceFishPaintStrategy()
          No-parameter constructor that instantiates the AffineTransform for internal use.
NiceFishPaintStrategy(AffineTransform at)
          Constructor that uses an externally supplied AFfineTransform for internal use.
 
Method Summary
protected  void paintCfg(Graphics g, Ball host)
          Override paintCfg to add the transform needed to keep the fish upright at all times.
 
Methods inherited from class ballwar.model.paint.MultiPaintStrategy
init, paintXfrm
 
Methods inherited from class ballwar.model.paint.APaintStrategy
paint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NiceFishPaintStrategy

public NiceFishPaintStrategy()
No-parameter constructor that instantiates the AffineTransform for internal use.


NiceFishPaintStrategy

public NiceFishPaintStrategy(AffineTransform at)
Constructor that uses an externally supplied AFfineTransform for internal use.

Parameters:
at - The AffineTransform to use.
Method Detail

paintCfg

protected void paintCfg(Graphics g,
                        Ball host)
Override paintCfg to add the transform needed to keep the fish upright at all times.

Overrides:
paintCfg in class APaintStrategy
Parameters:
g - The Graphics context that will be drawn upon.
host - The Ball to be painted.