Class Location

java.lang.Object
com.hp.lft.sdk.Location

public class Location extends 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

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

    Modifier and Type
    Method
    Description
    Returns the object position from which the offset is taken.
    Returns the x- and y- offset (in pixels) from the anchor position.
    void
    Sets the object position from which the offset is taken.
    void
    setOffset(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 Details

    • 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, 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 Details

    • 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 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(Point offset)
      Sets the x- and y- offset (in pixels) from the anchor position.
      Parameters:
      offset - the offset point from the anchor.