Package com.nerius.game
Interface CanvasAWTStub
- 
- All Known Subinterfaces:
- BoardAWTStub,- HeadlessBoardAWTStub
 - All Known Implementing Classes:
- BoardAWTAdapter,- CanvasAWTAdapter
 
 public interface CanvasAWTStubThis class is used in conjunction with anAbstractCanvas. It encapsulates only the most important functionality that a game board or an animation may need.- See Also:
- AbstractCanvas
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.ImageproduceImage(int width, int height)Images are useful for doing double buffering.java.awt.ImageproduceImage(java.awt.image.ImageProducer producer)getGraphics()on the returned image will fail; in other words the returned image is good for rendering and not so good for drawing onto.voidrequestUpdate()This method triggers a call toupdate(Graphics)on a correspondingAbstractCanvas.
 
- 
- 
- 
Method Detail- 
produceImagejava.awt.Image produceImage(int width, int height)Images are useful for doing double buffering. The returned image can be rendered and it can be drawn into by way ofgetGraphics().
 - 
produceImagejava.awt.Image produceImage(java.awt.image.ImageProducer producer) getGraphics()on the returned image will fail; in other words the returned image is good for rendering and not so good for drawing onto.
 - 
requestUpdatevoid requestUpdate() throws java.lang.IllegalMonitorStateExceptionThis method triggers a call toupdate(Graphics)on a correspondingAbstractCanvas. This method blocks until theupdate()method finishes. By agreement, this method shall only be called by a correspondingAbstractCanvas, and only by the thread invokingAbstractCanvas.run().- Throws:
- java.lang.IllegalMonitorStateException- if a second thread calls this method.
 
 
- 
 
-