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.
-
BACKWARD
- States of the robot.
-
FORWARD
- States of the robot.
-
LEFT
- States of the robot.
-
RIGHT
- States of the robot.
-
STOPPED
- States of the robot.
-
MovitRobotRemote()
- Start up the system.
-
action(Event, Object)
- When the user presses the Quit button, exit the system.
-
handleEvent(Event)
- The user uses the arrow keys on the keyboard to control the robot.
-
quit()
- Exits the system.
-
releaseLock()
- Delete the lock file.
-
run()
- Poll the system to see if the user was pressing the keyboard.
-
state()
- The current state.
-
stop()
- Stop the system.
FORWARD
public static int FORWARD
- States of the robot.
BACKWARD
public static int BACKWARD
- States of the robot.
LEFT
public static int LEFT
- States of the robot.
RIGHT
public static int RIGHT
- States of the robot.
STOPPED
public static int STOPPED
- States of the robot.
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.
stop
public void stop()
- Stop the system.
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.
state
public int state()
- The current state.
- Returns:
- the state.
releaseLock
public void releaseLock()
- Delete the lock file.
handleEvent
public boolean handleEvent(Event event)
- The user uses the arrow keys on the keyboard to control the robot.
- Overrides:
- handleEvent in class Component
action
public boolean action(Event e,
Object arg)
- When the user presses the Quit button, exit the system.
- Overrides:
- action in class Component
quit
public void quit()
- Exits the system.
All Packages Class Hierarchy This Package Previous Next Index