ballwar.model.paint
Class NiceFishPaintStrategy
java.lang.Object
ballwar.model.paint.APaintStrategy
ballwar.model.paint.MultiPaintStrategy
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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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.