Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.jemmy.drivers.input
Class RobotDriver

    java.lang.Object
      |
      +--org.netbeans.jemmy.drivers.LightSupportiveDriver
            |
            +--org.netbeans.jemmy.drivers.input.RobotDriver

All Implemented Interfaces:
  LightDriver

Direct Known Subclasses:
  KeyRobotDriver, MouseRobotDriver

public class RobotDriver
extends LightSupportiveDriver

Superclass for all drivers using robot.

Author:
  Alexandre Iline(alexandre.iline@sun.com)

Field Summary
`protected QueueTool` | `qtool` A QueueTool instance.
`protected ClassReference` | `robotReference` A reference to the robot instance.

Constructor Summary
`RobotDriver(Timeout autoDelay)` Constructs a RobotDriver object.
`RobotDriver(Timeout autoDelay, java.lang.String[] supported)` Constructs a RobotDriver object.

Method Summary
`protected void` | `makeAnOperation(java.lang.String method, java.lang.Object[] params, java.lang.Class[] paramClasses)` Performs a single operation.
`void` | `pressKey(ComponentOperator oper, int keyCode, int modifiers)` Presses a key.
`protected void` | `pressModifiers(ComponentOperator oper, int modifiers)` Presses modifiers keys by robot.
`void` | `releaseKey(ComponentOperator oper, int keyCode, int modifiers)` Releases a key.
`protected void` | `releaseModifiers(ComponentOperator oper, int modifiers)` Releases modifiers keys by robot.
`protected void` | `synchronizeRobot()` Calls `java.awt.Robot.waitForIdle()` method.

Methods inherited from class org.netbeans.jemmy.drivers.LightSupportiveDriver
`checkSupported, getSupported`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### robotReference

    protected ClassReference robotReference

  A reference to the robot instance.

### qtool

    protected QueueTool qtool

  A QueueTool instance.

Constructor Detail

### RobotDriver

    public RobotDriver(Timeout autoDelay,
                       java.lang.String[] supported)

  Constructs a RobotDriver object.
  Parameters:
    `autoDelay` - Time for `Robot.setAutoDelay(long)` method.
    `supported` - an array of supported class names

### RobotDriver

    public RobotDriver(Timeout autoDelay)

  Constructs a RobotDriver object.
  Parameters:
    `autoDelay` - Time for `Robot.setAutoDelay(long)` method.

Method Detail

### pressKey

    public void pressKey(ComponentOperator oper,
                         int keyCode,
                         int modifiers)

  Presses a key.
  Parameters:
    `oper` - Operator to press a key on.
    `keyCode` - Key code (`KeyEventVK_*` field.
    `modifiers` - a combination of `InputEvent.*_MASK` fields.

### releaseKey

    public void releaseKey(ComponentOperator oper,
                           int keyCode,
                           int modifiers)

  Releases a key.
  Parameters:
    `oper` - Operator to release a key on.
    `keyCode` - Key code (`KeyEventVK_*` field.
    `modifiers` - a combination of `InputEvent.*_MASK` fields.

### makeAnOperation

    protected void makeAnOperation(java.lang.String method,
                                   java.lang.Object[] params,
                                   java.lang.Class[] paramClasses)

  Performs a single operation.
  Parameters:
    `method` - a name of `java.awt.Robot` method.
    `params` - method parameters
    `paramClasses` - method parameters classes

### synchronizeRobot

    protected void synchronizeRobot()

  Calls `java.awt.Robot.waitForIdle()` method.

### pressModifiers

    protected void pressModifiers(ComponentOperator oper,
                                  int modifiers)

  Presses modifiers keys by robot.
  Parameters:
    `oper` - an operator for a component to press keys on.
    `modifiers` - a combination of `InputEvent.*_MASK` fields.

### releaseModifiers

    protected void releaseModifiers(ComponentOperator oper,
                                    int modifiers)

  Releases modifiers keys by robot.
  Parameters:
    `oper` - an operator for a component to release keys on.
    `modifiers` - a combination of `InputEvent.*_MASK` fields.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD