ballworld.model.paint.strategy
Class NiceFishPaintStrategy

java.lang.Object
  extended by ballworld.model.paint.APaintStrategy
      extended by ballworld.model.paint.MultiPaintStrategy
          extended by ballworld.model.paint.strategy.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 ballworld.model.paint.APaintStrategy
at
 
Fields inherited from interface ballworld.model.IPaintStrategy
NullObject
 
Constructor Summary
NiceFishPaintStrategy()
          No-parameter constructor that instantiates the AffineTransform for internal use.
NiceFishPaintStrategy(java.awt.geom.AffineTransform at)
          Constructor that uses an externally supplied AFfineTransform for internal use.
 
Method Summary
protected  void paintCfg(java.awt.Graphics g, Ball host)
          Override paintCfg to add the transform needed to keep the fish upright at all times.
 
Methods inherited from class ballworld.model.paint.MultiPaintStrategy
init, paintXfrm
 
Methods inherited from class ballworld.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(java.awt.geom.AffineTransform at)
Constructor that uses an externally supplied AFfineTransform for internal use.

Parameters:
at - The AffineTransform to use.
Method Detail

paintCfg

protected void paintCfg(java.awt.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.