public class RobotDriver extends LightSupportiveDriver
Modifier and Type | Field and Description |
---|---|
protected Timeout |
autoDelay |
protected QueueTool |
qtool
A QueueTool instance.
|
protected ClassReference |
robotReference
A reference to the robot instance.
|
Constructor and Description |
---|
RobotDriver(Timeout autoDelay)
Constructs a RobotDriver object.
|
RobotDriver(Timeout autoDelay,
boolean smooth) |
RobotDriver(Timeout autoDelay,
java.lang.String[] supported)
Constructs a RobotDriver object.
|
RobotDriver(Timeout autoDelay,
java.lang.String[] supported,
boolean smooth) |
Modifier and Type | Method and Description |
---|---|
void |
clickMouse(int x,
int y,
int clickCount,
int mouseButton,
int modifiers,
Timeout mouseClick) |
void |
dragMouse(int x,
int y,
int mouseButton,
int modifiers) |
void |
dragNDrop(int start_x,
int start_y,
int end_x,
int end_y,
int mouseButton,
int modifiers,
Timeout before,
Timeout after) |
protected void |
makeAnOperation(java.lang.String method,
java.lang.Object[] params,
java.lang.Class[] paramClasses)
Performs a single operation.
|
void |
moveMouse(int x,
int y) |
void |
pressKey(int keyCode,
int modifiers)
Presses a key.
|
protected void |
pressModifiers(int modifiers)
Presses modifiers keys by robot.
|
void |
pressMouse(int mouseButton,
int modifiers) |
void |
releaseKey(int keyCode,
int modifiers)
Releases a key.
|
protected void |
releaseModifiers(int modifiers)
Releases modifiers keys by robot.
|
void |
releaseMouse(int mouseButton,
int modifiers) |
protected void |
synchronizeRobot()
Calls
java.awt.Robot.waitForIdle() method. |
checkSupported, getSupported
protected ClassReference robotReference
protected QueueTool qtool
protected Timeout autoDelay
public RobotDriver(Timeout autoDelay, java.lang.String[] supported)
autoDelay
- Time for Robot.setAutoDelay(long)
method.supported
- an array of supported class namespublic RobotDriver(Timeout autoDelay, java.lang.String[] supported, boolean smooth)
public RobotDriver(Timeout autoDelay)
autoDelay
- Time for Robot.setAutoDelay(long)
method.public RobotDriver(Timeout autoDelay, boolean smooth)
public void pressMouse(int mouseButton, int modifiers)
public void releaseMouse(int mouseButton, int modifiers)
public void moveMouse(int x, int y)
public void clickMouse(int x, int y, int clickCount, int mouseButton, int modifiers, Timeout mouseClick)
public void dragMouse(int x, int y, int mouseButton, int modifiers)
public void dragNDrop(int start_x, int start_y, int end_x, int end_y, int mouseButton, int modifiers, Timeout before, Timeout after)
public void pressKey(int keyCode, int modifiers)
oper
- Operator to press a key on.keyCode
- Key code (KeyEventVK_*
field.modifiers
- a combination of InputEvent.*_MASK
fields.public void releaseKey(int keyCode, int modifiers)
oper
- Operator to release a key on.keyCode
- Key code (KeyEventVK_*
field.modifiers
- a combination of InputEvent.*_MASK
fields.protected void makeAnOperation(java.lang.String method, java.lang.Object[] params, java.lang.Class[] paramClasses)
method
- a name of java.awt.Robot
method.params
- method parametersparamClasses
- method parameters classesprotected void synchronizeRobot()
java.awt.Robot.waitForIdle()
method.protected void pressModifiers(int modifiers)
oper
- an operator for a component to press keys on.modifiers
- a combination of InputEvent.*_MASK
fields.protected void releaseModifiers(int modifiers)
oper
- an operator for a component to release keys on.modifiers
- a combination of InputEvent.*_MASK
fields.