|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgame.BackupPixelObserver
public class BackupPixelObserver
| Constructor Summary | |
|---|---|
BackupPixelObserver(GraphicsPanel panel)
Initiates the act of observing changes wrought by ImagePainters to the supplied panel. |
|
| Method Summary | |
|---|---|
void |
pixelAffected(Point p,
java.awt.Color newColor,
java.awt.Color oldColor)
If this is the first time we have changed this pixel, then record the old color for this pixel so it can be restored later |
void |
restore()
For each pixel that has been changed, restore it to the color value it had when we started this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BackupPixelObserver(GraphicsPanel panel)
panel - The panel hosting the image being modified.| Method Detail |
|---|
public void pixelAffected(Point p,
java.awt.Color newColor,
java.awt.Color oldColor)
pixelAffected in interface PixelObserverpublic void restore()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||