public class SquarePaintStrategy extends java.lang.Object implements IPaintStrategy
NullObject
Constructor and Description |
---|
SquarePaintStrategy()
No parameter constructor for the class
|
Modifier and Type | Method and Description |
---|---|
void |
init(Ball context)
By default, do nothing for initialization.
|
void |
paint(java.awt.Graphics g,
Ball host)
Paints a square on the given graphics context using the color and radius
provided by the host.
|
public SquarePaintStrategy()
public void paint(java.awt.Graphics g, Ball host)
paint
in interface IPaintStrategy
g
- The graphics context to draw upon.host
- The host ball.public void init(Ball context)
init
in interface IPaintStrategy
context
- The ball to initialize.