com.hp.lft.sdk

Class Mouse



  • public class Mouse
    extends java.lang.Object
    A class that enables low-level mouse operations.
    When working in a grid configuration, use DesktopEnvironment.getMouse to get the MouseDevice object, which enables mouse operations on a specific environment or grid node.
    • Constructor Summary

      Constructor and Description
      Mouse() 
    • Method Summary

      Modifier and Type Method and Description
      static void buttonDown(java.awt.Point point)
      Presses the left mouse button at the specified point on the screen.
      static void buttonDown(java.awt.Point point, MouseButton button)
      Presses the specified mouse button at the specified point on the screen.
      static void buttonUp(java.awt.Point point)
      Releases the left mouse button at the specified point on the screen.
      static void buttonUp(java.awt.Point point, MouseButton button)
      Releases the specified mouse button at the specified point on the screen.
      static void click(java.awt.Point point)
      Moves the mouse to the specified point on the screen and clicks the left mouse button.
      static void click(java.awt.Point point, MouseButton button)
      Moves the mouse to the specified point on the screen and clicks the specified mouse button.
      static void doubleClick(java.awt.Point point)
      Moves the mouse to the specified point on the screen and double-clicks the left mouse button.
      static void doubleClick(java.awt.Point point, MouseButton button)
      Moves the mouse to the specified point on the screen and double-clicks the left mouse button.
      static void dragAndDrop(java.awt.Point fromPoint, java.awt.Point toPoint)
      Drags the mouse from and to the specified points while the left mouse button is pressed, and then releases the mouse button.
      static void dragAndDrop(java.awt.Point fromPoint, java.awt.Point toPoint, MouseButton button)
      Drags the mouse from and to the specified points while the specified mouse button is pressed, and then releases the mouse button.
      static void move(java.awt.Point point)
      Moves the mouse to the specified point on the screen.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Mouse

        public Mouse()
    • Method Detail

      • click

        public static void click(java.awt.Point point)
                          throws GeneralLeanFtException
        Moves the mouse to the specified point on the screen and clicks the left mouse button.
        Parameters:
        point - the point on the screen to place the mouse pointer.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • click

        public static void click(java.awt.Point point,
                                 MouseButton button)
                          throws GeneralLeanFtException
        Moves the mouse to the specified point on the screen and clicks the specified mouse button.
        Parameters:
        point - the point on the screen to place the mouse pointer.
        button - the MouseButton used for the click operation.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • doubleClick

        public static void doubleClick(java.awt.Point point)
                                throws GeneralLeanFtException
        Moves the mouse to the specified point on the screen and double-clicks the left mouse button.
        Parameters:
        point - the point on the screen to place the mouse pointer.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • doubleClick

        public static void doubleClick(java.awt.Point point,
                                       MouseButton button)
                                throws GeneralLeanFtException
        Moves the mouse to the specified point on the screen and double-clicks the left mouse button.
        Parameters:
        point - the point on the screen to place the mouse pointer.
        button - the MouseButton used for the double-click operation.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • dragAndDrop

        public static void dragAndDrop(java.awt.Point fromPoint,
                                       java.awt.Point toPoint)
                                throws GeneralLeanFtException
        Drags the mouse from and to the specified points while the left mouse button is pressed, and then releases the mouse button.
        Parameters:
        fromPoint - the point from which to perform the drag and drop operation.
        toPoint - the point where the drag ends and the mouse button is released.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • dragAndDrop

        public static void dragAndDrop(java.awt.Point fromPoint,
                                       java.awt.Point toPoint,
                                       MouseButton button)
                                throws GeneralLeanFtException
        Drags the mouse from and to the specified points while the specified mouse button is pressed, and then releases the mouse button.
        Parameters:
        fromPoint - the point from which to perform the drag and drop operation.
        toPoint - the point where the drag ends and the mouse button is released.
        button - the MouseButton that is pressed during the drag operation.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • buttonDown

        public static void buttonDown(java.awt.Point point)
                               throws GeneralLeanFtException
        Presses the left mouse button at the specified point on the screen.
        Parameters:
        point - the point where the mouse button is pressed.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • buttonDown

        public static void buttonDown(java.awt.Point point,
                                      MouseButton button)
                               throws GeneralLeanFtException
        Presses the specified mouse button at the specified point on the screen.
        Parameters:
        point - the point where the mouse button is pressed.
        button - the MouseButton to press.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • buttonUp

        public static void buttonUp(java.awt.Point point)
                             throws GeneralLeanFtException
        Releases the left mouse button at the specified point on the screen.
        Parameters:
        point - the point where the mouse button is released.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • buttonUp

        public static void buttonUp(java.awt.Point point,
                                    MouseButton button)
                             throws GeneralLeanFtException
        Releases the specified mouse button at the specified point on the screen.
        Parameters:
        point - the point where the mouse button is released.
        button - the MouseButton to release.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.
      • move

        public static void move(java.awt.Point point)
                         throws GeneralLeanFtException
        Moves the mouse to the specified point on the screen.
        Parameters:
        point - the point on the screen to place the mouse pointer.
        Throws:
        GeneralLeanFtException - if an error occurs during execution.