|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RobotPeer
Disabled: no SafeJ information.
RobotPeer defines an interface whereby toolkits support automated testing by allowing native input events to be generated from Java code. This interface should not be directly imported by code outside the java.awt.* hierarchy; it is not to be considered public and is subject to change.
Method Summary | |
---|---|
void |
dispose()
Disposes the robot peer when it is not needed anymore. |
int |
getRGBPixel(int x,
int y)
Gets the RGB value of the specified pixel on screen. |
int[] |
getRGBPixels(Rectangle bounds)
Gets the RGB values of the specified screen area as an array. |
void |
keyPress(int keycode)
Simulates a key press of the specified key. |
void |
keyRelease(int keycode)
Simulates a key release of the specified key. |
void |
mouseMove(int x,
int y)
Moves the mouse pointer to the specified screen location. |
void |
mousePress(int buttons)
Simulates a mouse press with the specified button(s). |
void |
mouseRelease(int buttons)
Simulates a mouse release with the specified button(s). |
void |
mouseWheel(int wheelAmt)
Simulates mouse wheel action. |
Method Detail |
---|
void mouseMove(int x, int y)
x
- the X location on screeny
- the Y location on screenRobot.mouseMove(int, int)
void mousePress(int buttons)
buttons
- the button maskRobot.mousePress(int)
void mouseRelease(int buttons)
buttons
- the button maskRobot.mouseRelease(int)
void mouseWheel(int wheelAmt)
wheelAmt
- number of notches to move the mouse wheelRobot.mouseWheel(int)
void keyPress(int keycode)
keycode
- the key code to pressRobot.keyPress(int)
void keyRelease(int keycode)
keycode
- the key code to releaseRobot.keyRelease(int)
int getRGBPixel(int x, int y)
x
- the X screen coordinatey
- the Y screen coordinate
Robot.getPixelColor(int, int)
int[] getRGBPixels(Rectangle bounds)
bounds
- the screen area to capture the RGB values from
Robot.createScreenCapture(Rectangle)
void dispose()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |