All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.part.MovitRobotRemote

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----pinball.part.MovitRobotRemote

public class MovitRobotRemote
extends Frame
implements Runnable
Control the robot by the keyboard.


Variable Index

 o BACKWARD
States of the robot.
 o FORWARD
States of the robot.
 o LEFT
States of the robot.
 o RIGHT
States of the robot.
 o STOPPED
States of the robot.

Constructor Index

 o MovitRobotRemote()
Start up the system.

Method Index

 o action(Event, Object)
When the user presses the Quit button, exit the system.
 o handleEvent(Event)
The user uses the arrow keys on the keyboard to control the robot.
 o quit()
Exits the system.
 o releaseLock()
Delete the lock file.
 o run()
Poll the system to see if the user was pressing the keyboard.
 o state()
The current state.
 o stop()
Stop the system.

Variables

 o FORWARD
 public static int FORWARD
States of the robot.

 o BACKWARD
 public static int BACKWARD
States of the robot.

 o LEFT
 public static int LEFT
States of the robot.

 o RIGHT
 public static int RIGHT
States of the robot.

 o STOPPED
 public static int STOPPED
States of the robot.

Constructors

 o MovitRobotRemote
 public MovitRobotRemote()
Start up the system. *. public static void main(String args[]) { new MovitRobotRemote(); } /** Place a Quit button on the screen and take the arrow keys to control the robot.

Methods

 o stop
 public void stop()
Stop the system.

 o run
 public void run()
Poll the system to see if the user was pressing the keyboard. If no key was pressed for a while, stop the robot.

 o state
 public int state()
The current state.

Returns:
the state.
 o releaseLock
 public void releaseLock()
Delete the lock file.

 o handleEvent
 public boolean handleEvent(Event event)
The user uses the arrow keys on the keyboard to control the robot.

Overrides:
handleEvent in class Component
 o action
 public boolean action(Event e,
                       Object arg)
When the user presses the Quit button, exit the system.

Overrides:
action in class Component
 o quit
 public void quit()
Exits the system.


All Packages  Class Hierarchy  This Package  Previous  Next  Index