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.
-
AdjustableFlippers()
-
-
flippersSave()
- Save the flipper's zones.
-
getLeft()
-
Get the left flipper.
-
getRight()
- Get the right flipper.
-
keyPressed(KeyEvent)
-
-
keyReleased(KeyEvent)
-
-
keyTyped(KeyEvent)
-
Keys are pressed, check them.
-
mouseClicked(MouseEvent)
-
-
mouseEntered(MouseEvent)
-
When the mouse is window, make sure the canvas has focus.
-
mouseExited(MouseEvent)
-
-
mousePressed(MouseEvent)
-
Mouse is pressed add the location of the mouse to the flipper zone.
-
mouseReleased(MouseEvent)
-
-
setParent(AdjustableDrawingCanvas)
-
Set the parent of this object.
AdjustableFlippers
public AdjustableFlippers()
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.
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
mouseClicked
public void mouseClicked(MouseEvent event)
- Overrides:
- mouseClicked in class Adjustments
mouseReleased
public void mouseReleased(MouseEvent event)
- Overrides:
- mouseReleased in class Adjustments
mouseExited
public void mouseExited(MouseEvent event)
- Overrides:
- mouseExited in class Adjustments
keyPressed
public void keyPressed(KeyEvent key)
- Overrides:
- keyPressed in class Adjustments
keyReleased
public void keyReleased(KeyEvent key)
- Overrides:
- keyReleased in class Adjustments
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
keyTyped
public void keyTyped(KeyEvent key)
- Keys are pressed, check them.
- Parameters:
- key - the key pressed.
- Overrides:
- keyTyped in class Adjustments
getLeft
public Polygon getLeft()
- Get the left flipper.
- Returns:
- the left flipper.
getRight
public Polygon getRight()
- Get the right flipper.
- Returns:
- the right flipper.
flippersSave
public void flippersSave()
- Save the flipper's zones.
All Packages Class Hierarchy This Package Previous Next Index