All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.player.human.HumanWindow

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----pinball.player.human.HumanWindow

public class HumanWindow
extends Frame
Displays the image from the pinball machine. Also captures the keystokes to play the pinball machine.


Variable Index

 o ball
Location of the ball.
 o commands
Used for the key commands for the flippers.
 o drawable
Is the image drawable.
 o frameBuffer
The image to draw to.
 o graphicsContext
Where to draw to off screen.
 o height
Frame's dimensions.
 o image
The image from the camera.
 o insets
The windows insets.
 o strategy
The strategy thread.
 o width
Frame's dimensions.

Constructor Index

 o HumanWindow(int, int, Stub)
Make the window.

Method Index

 o clear()
Clear the window.
 o doDraw()
Do the drawing to the window.
 o getFlipperCommands()
Send the flipper comamnds.
 o paint(Graphics)
Draw the image.
 o setBall(int, int)
Set the location of the ball.
 o setImage(Image)
Set the image from the camera.
 o update(Graphics)
Draw the image.

Variables

 o strategy
 protected HumanStrategy strategy
The strategy thread.

 o image
 protected Image image
The image from the camera.

 o drawable
 protected boolean drawable
Is the image drawable.

 o commands
 protected FlipperCommands commands
Used for the key commands for the flippers.

 o width
 protected int width
Frame's dimensions.

 o height
 protected int height
Frame's dimensions.

 o graphicsContext
 protected Graphics graphicsContext
Where to draw to off screen.

 o frameBuffer
 protected Image frameBuffer
The image to draw to.

 o insets
 protected Insets insets
The windows insets.

 o ball
 protected Point ball
Location of the ball.

Constructors

 o HumanWindow
 public HumanWindow(int width,
                    int height,
                    Stub stub)
Make the window.

Parameters:
width - the width of the window.
height - the height of the window.
stub - the stub from the system.

Methods

 o getFlipperCommands
 public FlipperCommands getFlipperCommands()
Send the flipper comamnds.

Returns:
the flipper commands.
 o setImage
 public synchronized void setImage(Image image)
Set the image from the camera.

Parameters:
image - The image to draw.
 o setBall
 public synchronized void setBall(int x,
                                  int y)
Set the location of the ball.

Parameters:
x - the x location.
y - the y location.
 o update
 public void update(Graphics g)
Draw the image.

Overrides:
update in class Container
 o paint
 public synchronized void paint(Graphics g)
Draw the image.

Overrides:
paint in class Container
 o clear
 public synchronized void clear()
Clear the window.

 o doDraw
 public void doDraw()
Do the drawing to the window.


All Packages  Class Hierarchy  This Package  Previous  Next  Index