Share this page

com.hp.lft.sdk.java

# Interface ToolBarButton

-     public interface ToolBarButton

  A tool bar button in a Java tool bar.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `int` | `getIndex()` The zero-based index of the toolbar button.
    `java.lang.String` | `getName()` Returns the name of the toolbar button.
    `boolean` | `isEnabled()` Indicates whether the toolbar button accepts user input.
    `boolean` | `isSelected()` Indicates whether the toolbar button is either pressed or checked.
    `void` | `press()` Presses this toolbar button.
    `void` | `showDropdown()` Opens the drop down menu associated with this toolbar button by clicking the arrow part of the button.

- - ### Method Detail

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

      Indicates whether the toolbar button accepts user input.
      Returns:
        true if enabled.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getIndex

          int getIndex()
                throws GeneralLeanFtException

      The zero-based index of the toolbar button. The index does not include hidden and separator buttons.
      Returns:
        the index of the button.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isSelected

          boolean isSelected()
                      throws GeneralLeanFtException

      Indicates whether the toolbar button is either pressed or checked. A button is pressed if it is being clicked; checked if it is a toggle button that is selected.
      Returns:
        true if the toolbar button is either pressed or checked.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getName

          java.lang.String getName()
                            throws GeneralLeanFtException

      Returns the name of the toolbar button.
      Returns:
        the name of the toolbar button.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### showDropdown

          void showDropdown()
                     throws GeneralLeanFtException

      Opens the drop down menu associated with this toolbar button by clicking the arrow part of the button.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### press

          void press()
              throws GeneralLeanFtException

      Presses this toolbar button.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

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: