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.
-
ball
- Location of the ball.
-
commands
- Used for the key commands for the flippers.
-
drawable
- Is the image drawable.
-
frameBuffer
- The image to draw to.
-
graphicsContext
- Where to draw to off screen.
-
height
- Frame's dimensions.
-
image
- The image from the camera.
-
insets
- The windows insets.
-
strategy
- The strategy thread.
-
width
- Frame's dimensions.
-
HumanWindow(int, int, Stub)
- Make the window.
-
clear()
- Clear the window.
-
doDraw()
- Do the drawing to the window.
-
getFlipperCommands()
-
Send the flipper comamnds.
-
paint(Graphics)
- Draw the image.
-
setBall(int, int)
- Set the location of the ball.
-
setImage(Image)
- Set the image from the camera.
-
update(Graphics)
- Draw the image.
strategy
protected HumanStrategy strategy
- The strategy thread.
image
protected Image image
- The image from the camera.
drawable
protected boolean drawable
- Is the image drawable.
commands
protected FlipperCommands commands
- Used for the key commands for the flippers.
width
protected int width
- Frame's dimensions.
height
protected int height
- Frame's dimensions.
graphicsContext
protected Graphics graphicsContext
- Where to draw to off screen.
frameBuffer
protected Image frameBuffer
- The image to draw to.
insets
protected Insets insets
- The windows insets.
ball
protected Point ball
- Location of the ball.
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.
getFlipperCommands
public FlipperCommands getFlipperCommands()
- Send the flipper comamnds.
- Returns:
- the flipper commands.
setImage
public synchronized void setImage(Image image)
- Set the image from the camera.
- Parameters:
- image - The image to draw.
setBall
public synchronized void setBall(int x,
int y)
- Set the location of the ball.
- Parameters:
- x - the x location.
- y - the y location.
update
public void update(Graphics g)
- Draw the image.
- Overrides:
- update in class Container
paint
public synchronized void paint(Graphics g)
- Draw the image.
- Overrides:
- paint in class Container
clear
public synchronized void clear()
- Clear the window.
doDraw
public void doDraw()
- Do the drawing to the window.
All Packages Class Hierarchy This Package Previous Next Index