|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.actions.types.RobotAction
public class RobotAction
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.
Nested Class Summary | |
---|---|
static class |
RobotAction.MouseWheelDirection
multiply by these to set a direction |
static class |
RobotAction.RobotCommand
Embodies a robot method and its arguments. |
static class |
RobotAction.RobotMethod
Different things you can ask a robot to do. |
Constructor Summary | |
---|---|
RobotAction()
|
Method Summary | |
---|---|
void |
createScreenCapture(java.awt.Rectangle screenRect,
java.io.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,
RobotAction.MouseWheelDirection direction)
|
void |
setAutoDelay(int ms)
|
void |
setAutoWaitForIdle(boolean isOn)
|
void |
setScreenDevice(int requestedDevice)
|
void |
typeString(java.lang.String text)
|
void |
waitForIdle()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.stanford.hci.r3.actions.R3Action |
---|
toString |
Constructor Detail |
---|
public RobotAction()
Method Detail |
---|
public void createScreenCapture(java.awt.Rectangle screenRect, java.io.File destFile)
screenRect
- public void delay(int ms)
ms
- public int getNumCommands()
public void getPixelColor(int x, int y)
x
- y
- public void invoke()
invoke
in interface R3Action
R3Action.invoke()
public void keyPress(int keycode)
keycode
- e.g, KeyEvent.VK_A, or KeyEvent.VK_SHIFTpublic void keyRelease(int keycode)
keycode
- public void keyType(int keycode)
keycode
- e.g, KeyEvent.VK_A, or KeyEvent.VK_SHIFTpublic void mouseMove(int x, int y)
x
- y
- public void mousePress(int buttons)
buttons
- public void mouseRelease(int buttons)
buttons
- public void mouseWheel(int wheelAmt, RobotAction.MouseWheelDirection direction)
wheelAmt
- direction
- public void setAutoDelay(int ms)
ms
- public void setAutoWaitForIdle(boolean isOn)
isOn
- public void setScreenDevice(int requestedDevice)
requestedDevice
- public void typeString(java.lang.String text)
text
- public void waitForIdle()
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |