FileDocCategorySizeDatePackage
NativeRobot.javaAPI DocAndroid 1.5 API2445Wed May 06 22:41:54 BST 2009org.apache.harmony.awt.wtk

NativeRobot

public interface NativeRobot
A cross-platform interface for java.awt.Robot implementation

Fields Summary
Constructors Summary
Methods Summary
public java.awt.image.BufferedImagecreateScreenCapture(java.awt.Rectangle screenRect)

see
java.awt.Robot#createScreenCapture(Rectangle)
param
screenRect rectangle to capture in screen coordinates
return
the captured image or null if capture failed.

public java.awt.ColorgetPixel(int x, int y)

see
java.awt.Robot#getPixelColor(int, int)

public voidkeyEvent(int keycode, boolean press)
Generate a native system keyboard input event.

param
keycode A Java virtual key code
param
press A key is pressed if true, released otherwise
see
java.awt.Robot#keyPress(int)
throws
IllegalArgumentException if keycode is invalid in the native system

public voidmouseButton(int buttons, boolean press)
Generate a native system mouse button(s) press or release event.

param
buttons A mask of Java mouse button flags
param
press buttons are pressed if true, released otherwise
see
java.awt.Robot#mousePress(int)

public voidmouseMove(int x, int y)
Generate a native system mouse motion event.

see
java.awt.Robot#mouseMove(int, int)

public voidmouseWheel(int wheelAmt)
Generate a native system mouse wheel event.

see
java.awt.Robot#mouseWheel(int)