All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.player.adjustable.AdjustableFlippers

java.lang.Object
   |
   +----pinball.player.adjustable.Adjustments
           |
           +----pinball.player.adjustable.AdjustableFlippers

public class AdjustableFlippers
extends Adjustments
The flipper's zone can be adjusted by the user. Clicking the mouse on the screen, the user can define the zone for the left and right flippers. When the ball goes into the flipper's zone, that flipper flips.


Constructor Index

 o AdjustableFlippers()

Method Index

 o flippersSave()
Save the flipper's zones.
 o getLeft()
Get the left flipper.
 o getRight()
Get the right flipper.
 o keyPressed(KeyEvent)
 o keyReleased(KeyEvent)
 o keyTyped(KeyEvent)
Keys are pressed, check them.
 o mouseClicked(MouseEvent)
 o mouseEntered(MouseEvent)
When the mouse is window, make sure the canvas has focus.
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
Mouse is pressed add the location of the mouse to the flipper zone.
 o mouseReleased(MouseEvent)
 o setParent(AdjustableDrawingCanvas)
Set the parent of this object.

Constructors

 o AdjustableFlippers
 public AdjustableFlippers()

Methods

 o setParent
 public void setParent(AdjustableDrawingCanvas parent)
Set the parent of this object. Used to set the focus on the canvas for events.

Parameters:
parent - Window who has the flippers image.
 o mousePressed
 public void mousePressed(MouseEvent event)
Mouse is pressed add the location of the mouse to the flipper zone.

Parameters:
event - the mouse was pressed.
Overrides:
mousePressed in class Adjustments
 o mouseClicked
 public void mouseClicked(MouseEvent event)
Overrides:
mouseClicked in class Adjustments
 o mouseReleased
 public void mouseReleased(MouseEvent event)
Overrides:
mouseReleased in class Adjustments
 o mouseExited
 public void mouseExited(MouseEvent event)
Overrides:
mouseExited in class Adjustments
 o keyPressed
 public void keyPressed(KeyEvent key)
Overrides:
keyPressed in class Adjustments
 o keyReleased
 public void keyReleased(KeyEvent key)
Overrides:
keyReleased in class Adjustments
 o mouseEntered
 public void mouseEntered(MouseEvent event)
When the mouse is window, make sure the canvas has focus.

Parameters:
event - Mouse has entered the window.
Overrides:
mouseEntered in class Adjustments
 o keyTyped
 public void keyTyped(KeyEvent key)
Keys are pressed, check them.

Parameters:
key - the key pressed.
Overrides:
keyTyped in class Adjustments
 o getLeft
 public Polygon getLeft()
Get the left flipper.

Returns:
the left flipper.
 o getRight
 public Polygon getRight()
Get the right flipper.

Returns:
the right flipper.
 o flippersSave
 public void flippersSave()
Save the flipper's zones.


All Packages  Class Hierarchy  This Package  Previous  Next  Index