Class RobotDriver

    • Field Detail

      • robotReference

        protected ClassReference robotReference
        A reference to the robot instance.
      • qtool

        protected QueueTool qtool
        A QueueTool instance.
      • autoDelay

        protected Timeout autoDelay
    • Constructor Detail

      • RobotDriver

        public RobotDriver​(Timeout autoDelay,
                           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,
                           String[] supported,
                           boolean smooth)
      • RobotDriver

        public RobotDriver​(Timeout autoDelay)
        Constructs a RobotDriver object.
        Parameters:
        autoDelay - Time for Robot.setAutoDelay(long) method.
      • RobotDriver

        public RobotDriver​(Timeout autoDelay,
                           boolean smooth)
    • Method Detail

      • pressMouse

        public void pressMouse​(int mouseButton,
                               int modifiers)
      • releaseMouse

        public void releaseMouse​(int mouseButton,
                                 int modifiers)
      • moveMouse

        public void moveMouse​(int x,
                              int y)
      • clickMouse

        public void clickMouse​(int x,
                               int y,
                               int clickCount,
                               int mouseButton,
                               int modifiers,
                               Timeout mouseClick)
      • dragMouse

        public void dragMouse​(int x,
                              int y,
                              int mouseButton,
                              int modifiers)
      • dragNDrop

        public void dragNDrop​(int start_x,
                              int start_y,
                              int end_x,
                              int end_y,
                              int mouseButton,
                              int modifiers,
                              Timeout before,
                              Timeout after)
      • pressKey

        public void pressKey​(int keyCode,
                             int modifiers)
        Presses a key.
        Parameters:
        keyCode - Key code (KeyEventVK_* field.
        modifiers - a combination of InputEvent.*_MASK fields.
      • releaseKey

        public void releaseKey​(int keyCode,
                               int modifiers)
        Releases a key.
        Parameters:
        keyCode - Key code (KeyEventVK_* field.
        modifiers - a combination of InputEvent.*_MASK fields.
      • makeAnOperation

        protected void makeAnOperation​(String method,
                                       Object[] params,
                                       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​(int modifiers)
        Presses modifiers keys by robot.
        Parameters:
        modifiers - a combination of InputEvent.*_MASK fields.
      • releaseModifiers

        protected void releaseModifiers​(int modifiers)
        Releases modifiers keys by robot.
        Parameters:
        modifiers - a combination of InputEvent.*_MASK fields.