Open topic with navigation

com.hp.lft.sdk.java

# Interface TreeView

- All Superinterfaces:
    Clickable, DoubleClickable, LocationInfoProvider, SupportsNativeObject, TestObject, TestObjectDescriber, UiObjectBase, VisibleProvider, WaitUntilVisibleProvider, WaitUntilEnabledProvider, EnabledProvider

      public interface TreeView
      extends UiObjectBase, TestObject

  A Java tree.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateNode(java.lang.String nodePath)` Activates a node in the tree by node path.
    `void` | `activateNode(TreeViewNode node)` Activates a node in the tree.
    `java.lang.String` | `buildNodePath(java.lang.Object... nodePathParts)` Returns the path of a node in the tree.
    `void` | `deselect(java.lang.String... nodesPaths)` Clears the selection of nodes in the tree by nodes paths.
    `void` | `deselect(TreeViewNode... nodes)` Clears the selection of nodes in the tree.
    `void` | `deselectRange(java.lang.String fromNodePath, java.lang.String toNodePath)` Clears the selection of the specified range of nodes in the tree.
    `void` | `extendSelect(java.lang.String... nodesPaths)` Selects additional nodes in the tree.
    `void` | `extendSelect(TreeViewNode... nodes)` Selects additional nodes in the tree. Note: Supported in LeanFT versions 14.51 and later.
    `java.lang.String` | `getColumnHeader(int columnIndex)` Returns the header of the specified column in the tree.
    `int` | `getColumnsCount()` Returns the number of columns in the tree.
    `TreeViewNode` | `getNode(java.lang.String nodePath)` Returns the specified node.
    `java.util.List<TreeViewNode>` | `getSelectedNodes()` Returns the selected nodes in the tree.
    `int` | `getVisibleNodesCount()` Returns the number of visible nodes in the tree.
    `void` | `select(java.lang.String... nodesPaths)` Selects the specified nodes by nodes paths.
    `void` | `select(TreeViewNode... nodes)` Selects the specified nodes.
    `void` | `selectRange(java.lang.String fromNodePath, java.lang.String toNodePath)` Selects the specified range of nodes.
    `void` | `selectRange(TreeViewNode fromNode, TreeViewNode toNode)` Selects the specified range of nodes. Note: Supported in LeanFT versions 14.51 and later.

    - ### Methods inherited from interface com.hp.lft.sdk.java.UiObjectBase

      `createObject, createObject, fireEvent, getAttachedText, getBackgroundColor, getForegroundColor, getLabel, getNativeClass, getObjectName, getObjectProperty, getPath, getStatics, getTagName, isEnabled, isFocused, isVisible, sendKeys, sendKeys`

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

      `click, click, click`

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

      `doubleClick, doubleClick, doubleClick`

    - ### 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.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.WaitUntilEnabledProvider

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

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

      `waitUntilVisible, waitUntilVisible`

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

      `isVisible`

- - ### Method Detail

    - #### getVisibleNodesCount

          int getVisibleNodesCount()
                            throws GeneralLeanFtException

      Returns the number of visible nodes in the tree.
      Returns:
        the number of visible nodes.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getColumnsCount

          int getColumnsCount()
                       throws GeneralLeanFtException

      Returns the number of columns in the tree.
      Returns:
        the number of columns.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getSelectedNodes

          java.util.List<TreeViewNode> getSelectedNodes()
                                                 throws GeneralLeanFtException

      Returns the selected nodes in the tree.
      Returns:
        the selected nodes.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### buildNodePath

          java.lang.String buildNodePath(java.lang.Object... nodePathParts)

      Returns the path of a node in the tree.
      Parameters:
        `nodePathParts` - the node path parts can be: text(string) or numeric index(int). Index values are 0-based.
      Returns:
        the tree node path.

    - #### activateNode

          void activateNode(TreeViewNode node)
                     throws GeneralLeanFtException

      Activates a node in the tree.
      Parameters:
        `node` - the node to activate.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activateNode

          void activateNode(java.lang.String nodePath)
                     throws GeneralLeanFtException

      Activates a node in the tree by node path.
      Parameters:
        `nodePath` - the full path of the node to activate.
        Tip: Use the `buildNodePath(java.lang.Object...)` method to build the node path string to be used as the nodePath argument for this method.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

          void deselect(TreeViewNode... nodes)
                 throws GeneralLeanFtException

      Clears the selection of nodes in the tree.
      Parameters:
        `nodes` - the nodes to deselect.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselect

          void deselect(java.lang.String... nodesPaths)
                 throws GeneralLeanFtException

      Clears the selection of nodes in the tree by nodes paths.
      Parameters:
        `nodesPaths` - the paths of the nodes to deselect.
        Tip: Use the `buildNodePath(java.lang.Object...)` method to build the node path strings to be used as arguments for this method.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### deselectRange

          void deselectRange(java.lang.String fromNodePath,
                             java.lang.String toNodePath)
                      throws GeneralLeanFtException

      Clears the selection of the specified range of nodes in the tree.
      Parameters:
        `fromNodePath` - 0-based index of the first node in the range.
        Tip: Use the `buildNodePath(java.lang.Object...)` method to build the node path strings to be used as the fromNodePath and toNodePath arguments for this method.
        `toNodePath` - 0-based index of the last node of the range.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(java.lang.String... nodePaths)
          	throws GeneralLeanFtException

      Selects additional nodes in the tree.
      Parameters:
        `nodePaths` - the paths of the nodes to add to the selection.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### extendSelect

          void extendSelect(TreeViewNode... nodes)
          		throws GeneralLeanFtException

      Selects additional nodes in the tree.
      Note: Supported in LeanFT versions 14.51 and later.
      Parameters:
        `nodes` - the nodes to add to the selection.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getColumnHeader

          java.lang.String getColumnHeader(int columnIndex)
                                    throws GeneralLeanFtException

      Returns the header of the specified column in the tree.
      Parameters:
        `columnIndex` - 0-based index of the column from which to return the value.
      Returns:
        the header of the specified column.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getNode

           TreeViewNode getNode(java.lang.String nodePath)
                        throws GeneralLeanFtException

      Returns the specified node.
      Parameters:
        `nodePath` - the full path of the node to return within the tree.
        Tip: Use the `buildNodePath(java.lang.Object...)` method to build the node path string to be used as the nodePath argument for this method.
      Returns:
        the specified node.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(TreeViewNode... nodes)
               throws GeneralLeanFtException

      Selects the specified nodes.
      Parameters:
        `nodes` - the nodes to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### select

          void select(java.lang.String... nodesPaths)
               throws GeneralLeanFtException

      Selects the specified nodes by nodes paths.
      Parameters:
        `nodesPaths` - the paths of the nodes to select.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectRange

          void selectRange(java.lang.String fromNodePath,
              		  java.lang.String toNodePath)
          	throws GeneralLeanFtException

      Selects the specified range of nodes.
      Parameters:
        `fromNodePath` - 0-based index of the first node in the range.
        `toNodePath` - 0-based index of the last node of the range. Tip: Use the `buildNodePath(java.lang.Object...)` method to build the node path strings to be used as the fromNodePath and toNodePath arguments for this method.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectRange

          void selectRange(TreeViewNode fromNode,
                           TreeViewNode toNode)
                    throws GeneralLeanFtException

      Selects the specified range of nodes.
      Note: Supported in LeanFT versions 14.51 and later.
      Parameters:
        `fromNode` - the first node in the range.
        `toNode` - the last node of the range.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.