|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MacroTaskContext
Context for running a Macro.
The methods invoke an underlying Robot and handles translating the
relative locations to absolute locations.
See the corresponding methods of Robot for details on the methods.
| Method Summary | |
|---|---|
java.awt.Point |
getAbsoluteLocation(java.awt.Point relativeLocation)
Obtains the absolute location for the relative location. |
java.awt.Point |
getRelativeLocation(java.awt.Point absoluteLocation)
Obtains the relative location for the absolute location. |
void |
keyPress(int keycode)
As per Robot. |
void |
keyRelease(int keycode)
As per Robot. |
void |
keyStroke(int keycode)
Convenience method to do press and release of key. |
void |
keyText(java.lang.String text)
Convenience method to type in text. |
void |
mouseClick(int buttons)
Convenience method to do press and release of mouse button. |
void |
mouseMove(int x,
int y)
As per Robot. |
void |
mousePress(int buttons)
As per Robot. |
void |
mouseRelease(int buttons)
As per Robot. |
void |
mouseWheel(int wheelAmt)
As per Robot. |
| Method Detail |
|---|
void mouseMove(int x,
int y)
Robot.
x - X location.y - Y location.void mousePress(int buttons)
Robot.
buttons - Buttons.void mouseRelease(int buttons)
Robot.
buttons - Buttons.void mouseClick(int buttons)
buttons - Buttons as per Robot.void mouseWheel(int wheelAmt)
Robot.
buttons - Wheel amount.void keyPress(int keycode)
Robot.
keycode - Key code.void keyRelease(int keycode)
Robot.
keycode - Key code.void keyStroke(int keycode)
keycode - Key code as per Robot.void keyText(java.lang.String text)
text - Text to be typed in.java.awt.Point getAbsoluteLocation(java.awt.Point relativeLocation)
Obtains the absolute location for the relative location.
This is useful for example to display a JDialog and position
correctly.
relativeLocation - Relative location.
java.awt.Point getRelativeLocation(java.awt.Point absoluteLocation)
Obtains the relative location for the absolute location.
This is useful for example to find the relative location for a mouse move where the active window only provides an absolute location.
absoluteLocation - Absolute location.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||