com.hp.lft.sdk

Class Location



  • public class Location
    extends java.lang.Object
    Provides a location (relative to an object in the application) for operations that support it.
    For example, the Click method uses the Location class to determine where inside this object to perform the click.
    • Constructor Summary

      Constructor and Description
      Location(Position anchor)
      Initializes a new instance of the Location class using the specified object position and an offset (in pixels) of 0,0.
      Location(Position anchor, java.awt.Point offset)
      Initializes a new instance of the Location class using the specified object position and offset point.
    • Method Summary

      Modifier and Type Method and Description
      Position getAnchor()
      Returns the object position from which the offset is taken.
      java.awt.Point getOffset()
      Returns the x- and y- offset (in pixels) from the anchor position.
      void setAnchor(Position anchor)
      Sets the object position from which the offset is taken.
      void setOffset(java.awt.Point offset)
      Sets the x- and y- offset (in pixels) from the anchor position.
      • Methods inherited from class java.lang.Object

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

      • Location

        public Location(Position anchor)
        Initializes a new instance of the Location class using the specified object position and an offset (in pixels) of 0,0.
        Parameters:
        anchor - the object position from which the offset is taken. Possible values: Position.
      • Location

        public Location(Position anchor,
                        java.awt.Point offset)
        Initializes a new instance of the Location class using the specified object position and offset point.
        Parameters:
        anchor - the object position from which the offset is taken. Possible values: Position.
        offset - the x- and y- offset (in pixels) from the anchor position.
    • Method Detail

      • getAnchor

        public Position getAnchor()
        Returns the object position from which the offset is taken. Possible values: Position.
        Returns:
        the Position from which the offset is taken.
      • setAnchor

        public void setAnchor(Position anchor)
        Sets the object position from which the offset is taken. Possible values: Position.
        Parameters:
        anchor - the Position from which the offset is taken.
      • getOffset

        public java.awt.Point getOffset()
        Returns the x- and y- offset (in pixels) from the anchor position. Default value = 0,0.
        Returns:
        the offset point from the anchor.
      • setOffset

        public void setOffset(java.awt.Point offset)
        Sets the x- and y- offset (in pixels) from the anchor position.
        Parameters:
        offset - the offset point from the anchor.