Share this page

com.hp.lft.sdk

## Class VisualRelation

- java.lang.Object
- - com.hp.lft.sdk.VisualRelation

- All Implemented Interfaces:
    CloneableObject, java.lang.Cloneable

      public class VisualRelation
      extends java.lang.Object
      implements CloneableObject

  Class representing Visual Relations Identifier (VRI) data.
  Each VisualRelation class contains a reference to a test object, and up to three possible relations:
  horizontal relation, vertical relation, and proximity relation.
  The VisualRelation class can be initialized using the following builder pattern:

       new VisualRelation().setTestObject(someTestObject).setHorizontalRelation(HorizontalVisualRelation.RIGHT);

- - ### Constructor Summary

    Constructor and Description
    `VisualRelation()` Constructs a new Relation instance.

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Returns a clone of this instance.
    `HorizontalVisualRelation` | `getHorizontalRelation()` Returns the horizontal relation definition.
    `ProximityVisualRelation` | `getProximityRelation()` Returns the proximity relation info.
    `TestObject` | `getTestObject()` Returns the related test object.
    `VerticalVisualRelation` | `getVerticalRelation()` Returns the vertical relation definition.
    `VisualRelation` | `setHorizontalRelation(HorizontalVisualRelation horizontalRelation)` Sets the horizontal relation definition.
    `VisualRelation` | `setProximityRelation(ProximityVisualRelation proximityRelation)` Sets the proximity relation definition.
    `VisualRelation` | `setTestObject(TestObject testObject)` Sets the related test object.
    `VisualRelation` | `setVerticalRelation(VerticalVisualRelation verticalRelation)` Sets the vertical relation definition.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VisualRelation

          public VisualRelation()

      Constructs a new Relation instance.

  - ### Method Detail

    - #### getTestObject

          public TestObject getTestObject()

      Returns the related test object.
      Returns:
        the related test object.

    - #### setTestObject

          public VisualRelation setTestObject(TestObject testObject)

      Sets the related test object.
      Parameters:
        `testObject` - the related test object.
      Returns:
        the VisualRelation instance with the updated state (builder pattern).

    - #### getHorizontalRelation

          public HorizontalVisualRelation getHorizontalRelation()

      Returns the horizontal relation definition.
      Returns:
        the the horizontal relation definition.

    - #### setHorizontalRelation

          public VisualRelation setHorizontalRelation(HorizontalVisualRelation horizontalRelation)

      Sets the horizontal relation definition.
      Parameters:
        `horizontalRelation` - the horizontal relation definition.
      Returns:
        the Relation instance with the updated state (builder pattern).

    - #### getVerticalRelation

          public VerticalVisualRelation getVerticalRelation()

      Returns the vertical relation definition.
      Returns:
        the vertical relation definition.

    - #### setVerticalRelation

          public VisualRelation setVerticalRelation(VerticalVisualRelation verticalRelation)

      Sets the vertical relation definition.
      Parameters:
        `verticalRelation` - the vertical relation definition.
      Returns:
        the Relation instance with the updated state (builder pattern).

    - #### getProximityRelation

          public ProximityVisualRelation getProximityRelation()

      Returns the proximity relation info.
      Returns:
        the proximity relation info.

    - #### setProximityRelation

          public VisualRelation setProximityRelation(ProximityVisualRelation proximityRelation)

      Sets the proximity relation definition.
      Parameters:
        `proximityRelation` - the proximity relation definition.
      Returns:
        the Relation instance with the updated state (builder pattern).

    - #### clone

          public final java.lang.Object clone()
                                       throws java.lang.CloneNotSupportedException

      Description copied from interface: `CloneableObject`
      Returns a clone of this instance.
      Specified by:
        `clone` in interface `CloneableObject`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        a clone of this instance.
      Throws:
        `java.lang.CloneNotSupportedException` - if the instance cannot be cloned.

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: