All Packages Class Hierarchy This Package Previous Next Index
Class pinball.log.ViewerCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----pinball.log.ViewerCanvas
- public class ViewerCanvas
- extends Canvas
Used to display the frame from the log file.
-
frameBuffer
- The image to draw to.
-
graphicsContext
- Where to draw to off screen.
-
height
- The y size of the canvas (image).
-
model
- The greyscale values for the painting of the image.
-
myImage
- The image from the camera.
-
width
- The x size of the canvas (image).
-
ViewerCanvas()
- Used in the extended classed.
-
ViewerCanvas(int, int)
-
Initalize with the size and create the color table.
-
getMinimumSize()
-
Method used in creating the canvas.
-
getPreferredSize()
-
Method used in creating the canvas.
-
makeImage()
- Make the off screen image to draw to.
-
paint(Graphics)
- Draw the images.
-
setFlippers(Point, Point)
- Set the locations of the flippers.
-
update(Graphics)
- Called when the window is updated.
-
updateFrame(CameraFrame, int, int)
- Update the image's data.
myImage
protected Image myImage
- The image from the camera.
model
protected ColorModel model
- The greyscale values for the painting of the image.
width
protected int width
- The x size of the canvas (image).
height
protected int height
- The y size of the canvas (image).
graphicsContext
protected Graphics graphicsContext
- Where to draw to off screen.
frameBuffer
protected Image frameBuffer
- The image to draw to.
ViewerCanvas
public ViewerCanvas(int w,
int h)
- Initalize with the size and create the color table.
- Parameters:
- w - width of the image.
- h - height of the image.
ViewerCanvas
public ViewerCanvas()
- Used in the extended classed.
makeImage
public void makeImage()
- Make the off screen image to draw to.
updateFrame
public void updateFrame(CameraFrame frame,
int x,
int y)
- Update the image's data. Draw to the off screen image.
- Parameters:
- frame - the camera's frame.
- x - the ball's x location.
- y - the ball's y location.
paint
public void paint(Graphics g)
- Draw the images.
- Overrides:
- paint in class Canvas
update
public void update(Graphics g)
- Called when the window is updated.
- Overrides:
- update in class Component
setFlippers
public void setFlippers(Point left,
Point right)
- Set the locations of the flippers.
- Parameters:
- left - left flipper's location.
- right - right flipper's location.
getPreferredSize
public Dimension getPreferredSize()
- Method used in creating the canvas. Sets up the size.
- Overrides:
- getPreferredSize in class Component
getMinimumSize
public Dimension getMinimumSize()
- Method used in creating the canvas. Sets up the size.
- Overrides:
- getMinimumSize in class Component
All Packages Class Hierarchy This Package Previous Next Index