Share this page

com.hp.lft.sdk.sap.gui

## Class ElementDescription

- java.lang.Object
- - com.hp.lft.sdk.internal.PropertiesDescriptionBase
  - - com.hp.lft.sdk.PropertiesDescription
    - - com.hp.lft.sdk.DescriptionBase
      - - com.hp.lft.sdk.sap.gui.ElementDescription

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, java.lang.Cloneable
  Direct Known Subclasses:
    ButtonDescription, CalendarDescription, CheckBoxDescription, ComboBoxDescription, EditFieldDescription, EditorDescription, LabelDescription, MenubarDescription, OKCodeDescription, RadioButtonDescription, StatusBarDescription, TabControlDescription, TableBaseDescription, ToolBarDescription, TreeViewDescription, WindowDescription

      public class ElementDescription
      extends DescriptionBase

  The description of a SAP GUI for Windows element.

- - ### Nested Class Summary

    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ElementDescription.Builder` This class can be used to construct an instance of the ElementDescription class using the builder pattern.
    `protected static class` | `ElementDescription.Init<T extends ElementDescription.Init<T>>` Helper class for ElementDescription.Builder.

  - ### Field Summary

    - ### Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `properties`

  - ### Constructor Summary

    Modifier | Constructor and Description
    --- | ---
    `` | `ElementDescription()` Initializes a new instance of the ElementDescription class.
    `protected` | `ElementDescription(ElementDescription.Init<?> init)` Initializes a new instance of the ElementDescription class using the Builder pattern.

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `LocationProperty` | `getAbsoluteLocation()` Returns the element's coordinates relative to the screen in pixels.
    `StringProperty` | `getId()` Returns the element's unique identifier.
    `LocationProperty` | `getLocation()` Returns the element's coordinates relative to the parent window in pixels.
    `StringProperty` | `getName()` Returns the name of the element.
    `SizeProperty` | `getSize()` Returns the element's size in pixels.
    `ComponentType` | `getType()` Returns the GUI component type.
    `void` | `setAbsoluteLocation(java.lang.Integer absX, java.lang.Integer absY)` Sets the element's coordinates relative to the screen, in pixels.
    `void` | `setAbsoluteLocation(LocationProperty absLocation)` Sets the element's coordinates relative to the screen, in pixels.
    `void` | `setAbsoluteLocation(java.awt.Point absLocation)` Sets the element's coordinates relative to the screen, in pixels.
    `void` | `setId(java.lang.String id)` Sets the element's unique identifier.
    `void` | `setId(StringProperty id)` Sets the element's unique identifier.
    `void` | `setLocation(java.lang.Integer x, java.lang.Integer y)` Sets the element's coordinates relative to the parent window.
    `void` | `setLocation(LocationProperty location)` Sets the element's coordinates relative to the parent window.
    `void` | `setLocation(java.awt.Point location)` Sets the element's coordinates relative to the parent window.
    `void` | `setName(java.lang.String name)` Sets the name of the element.
    `void` | `setName(StringProperty name)` Sets the name of the element.
    `void` | `setSize(java.awt.Dimension size)` Sets the element's size in pixels.
    `void` | `setSize(java.lang.Integer width, java.lang.Integer height)` Sets the element's size in pixels.
    `void` | `setSize(SizeProperty size)` Sets the element's size in pixels.
    `void` | `setType(ComponentType type)` Sets the GUI component type.

    - ### Methods inherited from class com.hp.lft.sdk.DescriptionBase

      `cloneTo, getIndex, getIndexType, getVRI, setIndex, setIndexType, setVRI, setVRI`

    - ### Methods inherited from class com.hp.lft.sdk.PropertiesDescription

      `clone`

    - ### Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `getValueAs, getValueAsStringProperty, insertValue`

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

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

    - ### Methods inherited from interface com.hp.lft.sdk.CloneableObject

      `clone`

- - ### Constructor Detail

    - #### ElementDescription

          public ElementDescription()

      Initializes a new instance of the ElementDescription class.

    - #### ElementDescription

          protected ElementDescription(ElementDescription.Init<?> init)

      Initializes a new instance of the ElementDescription class using the Builder pattern.
      Parameters:
        `init` - the Builder pattern.

  - ### Method Detail

    - #### setType

          public void setType(ComponentType type)

      Sets the GUI component type.
      Parameters:
        `type` - the GUI component type.

    - #### getType

          public ComponentType getType()

      Returns the GUI component type.
      Returns:
        the GUI component type.

    - #### setId

          public void setId(StringProperty id)

      Sets the element's unique identifier.
      Parameters:
        `id` - a `StringProperty` or `RegExpProperty`.

    - #### setId

          public void setId(java.lang.String id)

      Sets the element's unique identifier.
      Parameters:
        `id` - the element's unique identifier in text format.

    - #### getId

          public StringProperty getId()

      Returns the element's unique identifier.
      Returns:
        the unique identifier.

    - #### setName

          public void setName(StringProperty name)

      Sets the name of the element.
      Parameters:
        `name` - a `StringProperty` or `RegExpProperty`.

    - #### setName

          public void setName(java.lang.String name)

      Sets the name of the element.
      Parameters:
        `name` - the name of the element.

    - #### getName

          public StringProperty getName()

      Returns the name of the element.
      Returns:
        the name of the element.

    - #### setLocation

          public void setLocation(LocationProperty location)

      Sets the element's coordinates relative to the parent window.
      Parameters:
        `location` - the coordinates in pixels.

    - #### setLocation

          public void setLocation(java.lang.Integer x,
                                  java.lang.Integer y)

      Sets the element's coordinates relative to the parent window.
      Parameters:
        `x` - in pixels.
        `y` - in pixels.

    - #### setLocation

          public void setLocation(java.awt.Point location)

      Sets the element's coordinates relative to the parent window.
      Parameters:
        `location` - the coordinates in pixels.

    - #### getLocation

          public LocationProperty getLocation()

      Returns the element's coordinates relative to the parent window in pixels.
      Returns:
        the coordinates.

    - #### setAbsoluteLocation

          public void setAbsoluteLocation(LocationProperty absLocation)

      Sets the element's coordinates relative to the screen, in pixels. 0,0 is the top-left corner of the primary monitor.
      Parameters:
        `absLocation` - the element's absolute coordinates.

    - #### setAbsoluteLocation

          public void setAbsoluteLocation(java.lang.Integer absX,
                                          java.lang.Integer absY)

      Sets the element's coordinates relative to the screen, in pixels. 0,0 is the top-left corner of the primary monitor.
      Parameters:
        `absX` - the absolute X.
        `absY` - the absolute Y.

    - #### setAbsoluteLocation

          public void setAbsoluteLocation(java.awt.Point absLocation)

      Sets the element's coordinates relative to the screen, in pixels. 0,0 is the top-left corner of the primary monitor.
      Parameters:
        `absLocation` - the element's absolute coordinates.

    - #### getAbsoluteLocation

          public LocationProperty getAbsoluteLocation()

      Returns the element's coordinates relative to the screen in pixels. 0,0 is the top-left corner of the primary monitor.
      Returns:
        the element's absolute coordinates.

    - #### setSize

          public void setSize(SizeProperty size)

      Sets the element's size in pixels.
      Parameters:
        `size` - the size.

    - #### setSize

          public void setSize(java.awt.Dimension size)

      Sets the element's size in pixels.
      Parameters:
        `size` - the size.

    - #### setSize

          public void setSize(java.lang.Integer width,
                              java.lang.Integer height)

      Sets the element's size in pixels.
      Parameters:
        `width` - the width.
        `height` - the height.

    - #### getSize

          public SizeProperty getSize()

      Returns the element's size in pixels.
      Returns:
        the size.

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: