Open topic with navigation

com.hp.lft.sdk.sap.gui

## Interface Editor

- All Superinterfaces:
    Element, LocationInfoProvider, SupportsNativeObject, TestObject, TestObjectDescriber, WaitUntilEnabledProvider, EnabledProvider

      public interface Editor
      extends Element

  A text area control in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `doubleClick()` Double-clicks inside the text area at the cursor position.
    `java.lang.String` | `getText()` Returns the text value of the editor.
    `boolean` | `isEnabled()` Indicates whether the editor can accept user inpout.
    `void` | `select(int startPos, int endPos)` Selects the specified section of text and positions the cursor at the end of the selection.
    `void` | `setCursorPosition(int pos)` Sets the cursor to the specified character position.
    `void` | `setText(java.lang.String text)` Sets the specified text in the text area.
    `void` | `setUnprotectedTextPart(java.lang.String text, int sectionNumber)` Sets the specified text in the predefined unprotected sections of the text area.

    - ### Methods inherited from interface com.hp.lft.sdk.sap.gui.Element

      `getId, getName, getType`

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

      `exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists`

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

      `describe`

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

      `getAbsoluteLocation, getLocation, getSize`

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

      `getNativeObject`

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

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

- - ### Method Detail

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

      Indicates whether the editor can accept user inpout.
      Returns:
        true if enabled.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getText

          java.lang.String getText()
                            throws GeneralLeanFtException

      Returns the text value of the editor.
      Returns:
        the text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### doubleClick

          void doubleClick()
                    throws GeneralLeanFtException

      Double-clicks inside the text area at the cursor position.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setText

          void setText(java.lang.String text)
                throws GeneralLeanFtException

      Sets the specified text in the text area.
      Parameters:
        `text` - the text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(int startPos,
                      int endPos)
               throws GeneralLeanFtException

      Selects the specified section of text and positions the cursor at the end of the selection.
      Parameters:
        `startPos` - the 0-based position of the first character.
        `endPos` - the 0-based position of the last character.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setCursorPosition

          void setCursorPosition(int pos)
                          throws GeneralLeanFtException

      Sets the cursor to the specified character position.
      Parameters:
        `pos` - the character position.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setUnprotectedTextPart

          void setUnprotectedTextPart(java.lang.String text,
                                      int sectionNumber)
                               throws GeneralLeanFtException

      Sets the specified text in the predefined unprotected sections of the text area.
      Parameters:
        `text` - the text .
        `sectionNumber` - The 1-based index of the unprotected section in which the text is set. Unprotected sections of the text area are numbered from top to bottom.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.