RobotAction Class Reference

Inheritance diagram for RobotAction:

R3Action List of all members.

Public Types

 ROLL_WHEEL_DOWN
 CreateScreenCapture
enum  MouseWheelDirection { ROLL_WHEEL_DOWN, value = val }
 multiply by these to set a direction
enum  RobotMethod {
  CreateScreenCapture, Delay, GetPixelColor, KPress,
  KRelease, KType, MMove, MPress,
  MRelease, MWheel, SADelay, SAWaitForIdle,
  command = commandString
}
 Different things you can ask a robot to do.

Public Member Functions

 RobotAction ()
void createScreenCapture (Rectangle screenRect, File destFile)
void delay (int ms)
int getNumCommands ()
void getPixelColor (int x, int y)
void invoke ()
 Run through our command list and invoke each command.
void keyPress (int keycode)
void keyRelease (int keycode)
void keyType (int keycode)
void mouseMove (int x, int y)
 Queue up a mouseMove.
void mousePress (int buttons)
 InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK.
void mouseRelease (int buttons)
void mouseWheel (int wheelAmt, MouseWheelDirection direction)
void setAutoDelay (int ms)
void setAutoWaitForIdle (boolean isOn)
void setScreenDevice (int requestedDevice)
void typeString (String text)
void waitForIdle ()

Classes

class  RobotCommand
 Embodies a robot method and its arguments.

Detailed Description

Makes the machine run low level keyboard and mouse actions.

TODO: Implement higher level calls, like drag from x1,y1 to x2,y2. Which ends up being a mouse down at x1,y1, mouseMove, and mouseUp at x2,y2.

This software is distributed under the BSD License.

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 34 of file RobotAction.java.


Member Function Documentation

void createScreenCapture ( Rectangle  screenRect,
File  destFile 
)

Parameters:
screenRect 
Returns:

Definition at line 109 of file RobotAction.java.

void delay ( int  ms  ) 

Parameters:
ms 

Definition at line 116 of file RobotAction.java.

int getNumCommands (  ) 

Returns:

Definition at line 123 of file RobotAction.java.

void getPixelColor ( int  x,
int  y 
)

Parameters:
x 
y 

Definition at line 131 of file RobotAction.java.

void invoke (  ) 

Run through our command list and invoke each command.

See also:
edu.stanford.hci.r3.actions.R3Action.invoke()

Implements R3Action.

Definition at line 163 of file RobotAction.java.

void keyPress ( int  keycode  ) 

Parameters:
keycode e.g, KeyEvent.VK_A, or KeyEvent.VK_SHIFT

Definition at line 229 of file RobotAction.java.

Referenced by RobotAction.keyType().

void keyRelease ( int  keycode  ) 

Parameters:
keycode 

Definition at line 236 of file RobotAction.java.

Referenced by RobotAction.keyType().

void keyType ( int  keycode  ) 

Parameters:
keycode e.g, KeyEvent.VK_A, or KeyEvent.VK_SHIFT

Definition at line 244 of file RobotAction.java.

References RobotAction.keyPress(), and RobotAction.keyRelease().

Referenced by RobotAction.typeString().

void mouseMove ( int  x,
int  y 
)

Queue up a mouseMove.

Parameters:
x 
y 

Definition at line 255 of file RobotAction.java.

void mousePress ( int  buttons  ) 

InputEvent.BUTTON1_MASK, InputEvent.BUTTON2_MASK, InputEvent.BUTTON3_MASK.

Parameters:
buttons 

Definition at line 264 of file RobotAction.java.

void mouseRelease ( int  buttons  ) 

Parameters:
buttons 
Returns:

Definition at line 272 of file RobotAction.java.

void mouseWheel ( int  wheelAmt,
MouseWheelDirection  direction 
)

Parameters:
wheelAmt 
direction 

Definition at line 280 of file RobotAction.java.

void setAutoDelay ( int  ms  ) 

Parameters:
ms 

Definition at line 288 of file RobotAction.java.

void setAutoWaitForIdle ( boolean  isOn  ) 

Parameters:
isOn 

Definition at line 295 of file RobotAction.java.

void setScreenDevice ( int  requestedDevice  ) 

Parameters:
requestedDevice 

Definition at line 302 of file RobotAction.java.

void typeString ( String  text  ) 

Parameters:
text 

Definition at line 309 of file RobotAction.java.

References RobotAction.keyType().

Referenced by ActionChannel.typeString().


The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:40 2007 for R3 Paper Toolkit by  doxygen 1.4.7