|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectballworld.model.paint.APaintStrategy
ballworld.model.paint.ImagePaintStrategy
ballworld.model.paint.UprightImagePaintStrategy
public class UprightImagePaintStrategy
An image painting strategy that adds behavior to the paintCfg process that keeps the image upright no matter which way it is going.
Field Summary |
---|
Fields inherited from class ballworld.model.paint.ImagePaintStrategy |
---|
localAT |
Fields inherited from class ballworld.model.paint.APaintStrategy |
---|
at |
Fields inherited from interface ballworld.model.IPaintStrategy |
---|
NullObject |
Constructor Summary | |
---|---|
UprightImagePaintStrategy(java.lang.String filename,
double fillFactor)
Constructor for an image painting strategy |
Method Summary | |
---|---|
protected void |
paintCfg(java.awt.Graphics g,
Ball host)
Augments the inherited paint method to add flipping of the image to keep it upright whenever the ball is going towards the left. |
Methods inherited from class ballworld.model.paint.ImagePaintStrategy |
---|
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 |
---|
public UprightImagePaintStrategy(java.lang.String filename, double fillFactor)
filename
- Fully qualified filename of the image file RELATIVE TO THIS PACKAGE, using a forward slash as a directory divider.fillFactor
- The ratio of the effective diameter (hit circle) of the image to the average of its width and height.Method Detail |
---|
protected void paintCfg(java.awt.Graphics g, Ball host)
paintCfg
in class APaintStrategy
g
- The Graphics context that will be drawn upon.host
- The Ball to be painted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |