All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.part.Flipper

java.lang.Object
   |
   +----pinball.part.Flipper

public class Flipper
extends Object
implements Serializable
The flippers in the pinball machine.


Variable Index

 o down
Is the flipper down?
 o flip
Used to control the flipper.
 o LEFT
Left flipper.
 o RIGHT
Right flipper.
 o serialVersionUID
Used to keep the same serialized version.
 o timeStamp
The time since last flipped.
 o which
Which type of flipper it is, left or right.
 o x
X location of the flipper.
 o y
Y location of the flipper.
 o yOffset
Offset of flipper from top of frame.

Constructor Index

 o Flipper(DataIO, int)
Set up the flipper to the left or right.

Method Index

 o down()
Is the flipper down.
 o flip()
Do a flip, but if already up do not flip.
 o readObject(ObjectInputStream)
 o reset()
Reset the flipper.
 o timeStamp()
Get the time stamp for the flipper.
 o up()
Is the flipper up.
 o writeObject(ObjectOutputStream)
Write the flipper to disk.
 o x()
Get the x location of the flipper.
 o x(int)
Set the y location of the flipper.
 o y()
Get the y location of the flipper.
 o y(int)
Set the y location of the flipper.
 o yOffset()
Get the Y offset of the flipper.
 o yOffset(int)
Set the Y offset of the flipper.

Variables

 o serialVersionUID
 static final long serialVersionUID
Used to keep the same serialized version.

 o flip
 private transient DataIO flip
Used to control the flipper.

 o which
 private BitSet which
Which type of flipper it is, left or right.

 o LEFT
 public static int LEFT
Left flipper.

 o RIGHT
 public static int RIGHT
Right flipper.

 o x
 private int x
X location of the flipper.

 o y
 private int y
Y location of the flipper.

 o yOffset
 private int yOffset
Offset of flipper from top of frame.

 o down
 private boolean down
Is the flipper down?

 o timeStamp
 private FlipperTimeStamp timeStamp
The time since last flipped.

Constructors

 o Flipper
 public Flipper(DataIO flip,
                int whichFlipper)
Set up the flipper to the left or right.

Parameters:
which - Which flipper this is. 0 = left, right = 1.

Methods

 o x
 public void x(int x)
Set the y location of the flipper.

Parameters:
x - The flipper's x location.
 o y
 public void y(int y)
Set the y location of the flipper.

Parameters:
y - The flipper's y location.
 o x
 public int x()
Get the x location of the flipper.

Returns:
x location of flipper.
 o y
 public int y()
Get the y location of the flipper.

Returns:
y location of flipper.
 o yOffset
 public void yOffset(int y)
Set the Y offset of the flipper.

Parameters:
y - y offset of flipper.
 o yOffset
 public int yOffset()
Get the Y offset of the flipper.

Returns:
y offset of flipper.
 o flip
 public void flip()
Do a flip, but if already up do not flip.

 o reset
 public void reset()
Reset the flipper.

 o timeStamp
 public FlipperTimeStamp timeStamp()
Get the time stamp for the flipper.

Returns:
timeStamp
 o up
 public boolean up()
Is the flipper up.

Returns:
flipper's up status.
 o down
 public boolean down()
Is the flipper down.

Returns:
flipper's down status.
 o writeObject
 private void writeObject(ObjectOutputStream s) throws IOException
Write the flipper to disk.

Parameters:
s - stream to write to.
 o readObject
 private void readObject(ObjectInputStream s) throws IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index