com.hp.lft.sdk

Class Location

  • java.lang.Object
    • com.hp.lft.sdk.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 TypeMethod and Description
      PositiongetAnchor()
      Returns the object position from which the offset is taken.
      java.awt.PointgetOffset()
      Returns the x- and y- offset (in pixels) from the anchor position.
      voidsetAnchor(Position anchor)
      Sets the object position from which the offset is taken.
      voidsetOffset(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.