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.
-
fileFound
- Was the file found.
-
flippers
- The flipper's flip zones.
-
in
- Input file, for flipper locations.
-
LEFT
- Left flipper.
-
login
- Input file, for flipper locations.
-
logout
- Output file, for flipper locations.
-
out
- Output file, for flipper locations.
-
parent
- Who's the canvas to draw on.
-
polygonFilename
- File name of the flipper zones.
-
RIGHT
- Right flipper.
-
which
- Which flipper is being edited.
-
AdjustableFlippers()
-
-
flipperAddPoint(int, int)
-
Add a point to the fliper.
-
flipperDelete()
- Delete the points for the flipper.
-
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.
LEFT
private final int LEFT
- Left flipper.
RIGHT
private final int RIGHT
- Right flipper.
which
private char which
- Which flipper is being edited.
flippers
private Polygon flippers[]
- The flipper's flip zones.
parent
private AdjustableDrawingCanvas parent
- Who's the canvas to draw on.
out
private FileOutputStream out
- Output file, for flipper locations.
logout
private ObjectOutputStream logout
- Output file, for flipper locations.
in
private FileInputStream in
- Input file, for flipper locations.
login
private ObjectInputStream login
- Input file, for flipper locations.
polygonFilename
private String polygonFilename
- File name of the flipper zones.
fileFound
private boolean fileFound
- Was the file found.
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
flipperDelete
private void flipperDelete()
- Delete the points for the flipper.
flipperAddPoint
private void flipperAddPoint(int x,
int y)
- Add a point to the fliper.
- Parameters:
- x - x location of the point.
- y - y location of the point.
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