Interface DoubleBufferedComponent

All Known Implementing Classes:
MarbleGameCanvas

public interface DoubleBufferedComponent

DoubleBufferedComponent is an interface for defining a double-buffered component. This interface is borrowed from Jia's textbook on page 279.

Version:
1.0
Author:
Andi Sutedja

Method Summary
 java.awt.Image createImage(int width, int height)
          Create an Image given the width and height.
 java.awt.Dimension getSize()
          Get the size of this Component object.
 void paintFrame(java.awt.Graphics g)
          Update the animation frame on the given Graphics object.
 

Method Detail

paintFrame

public void paintFrame(java.awt.Graphics g)
Update the animation frame on the given Graphics object.
Parameters:
g - the Graphics object

getSize

public java.awt.Dimension getSize()
Get the size of this Component object.
Returns:
the Dimension of this Component object

createImage

public java.awt.Image createImage(int width,
                                  int height)
Create an Image given the width and height.
Parameters:
width - the width of of the Image
height - the height of the Image
Returns:
the Image