|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectballworld.model.paint.APaintStrategy
public abstract class APaintStrategy
An abstract paint strategy that provides default behavior for its subclasses.
| Field Summary | |
|---|---|
protected java.awt.geom.AffineTransform |
at
The affine transform used by this paint strategy to translate, scale and rotate the image. |
| Fields inherited from interface ballworld.model.IPaintStrategy |
|---|
NullObject |
| Constructor Summary | |
|---|---|
APaintStrategy(java.awt.geom.AffineTransform at)
Constructor that initializes the strategy with an affine transform |
|
| Method Summary | |
|---|---|
void |
init(Ball context)
By default, do nothing for initialization. |
void |
paint(java.awt.Graphics g,
Ball host)
Paints on the given graphics context using the color, scale and direction provided by the host. |
protected void |
paintCfg(java.awt.Graphics g,
Ball host)
Used for doing additional configurations by a subclass. |
abstract void |
paintXfrm(java.awt.Graphics g,
Ball host,
java.awt.geom.AffineTransform at)
Paints the host onto the given Graphics context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.geom.AffineTransform at
| Constructor Detail |
|---|
public APaintStrategy(java.awt.geom.AffineTransform at)
at - The AffineTransform for this paint strategy to use.| Method Detail |
|---|
public void paint(java.awt.Graphics g,
Ball host)
paint in interface IPaintStrategyg - The Graphics context that will be paint onhost - The host Ball that the required information will be pulled from.public void init(Ball context)
init in interface IPaintStrategycontext - The ball to initialize.
protected void paintCfg(java.awt.Graphics g,
Ball host)
g - The Graphics context that will be drawn upon.host - The Ball to be painted.
public abstract void paintXfrm(java.awt.Graphics g,
Ball host,
java.awt.geom.AffineTransform at)
g - The graphics context to draw upon.host - The host ball.at - The affine transform to use.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||