Open topic with navigation

com.hp.lft.sdk.java

# Class MenuDescription

- java.lang.Object
- - com.hp.lft.sdk.internal.PropertiesDescriptionBase
  - - com.hp.lft.sdk.PropertiesDescription
    - - com.hp.lft.sdk.DescriptionBase
      - - com.hp.lft.sdk.java.UiObjectBaseDescription
        - - com.hp.lft.sdk.java.MenuDescription

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, java.lang.Cloneable

      public class MenuDescription
      extends UiObjectBaseDescription

  The description of a Java Menu test object.

- - ### Nested Class Summary

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

  - ### Field Summary

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

      `properties`

  - ### Constructor Summary

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

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Integer` | `getSubMenusCount()` Returns the number of menu items that are direct children of this menu.
    `StringProperty` | `getText()` Returns the menu's text.
    `void` | `setSubMenusCount(java.lang.Integer count)` Sets the number of menu items that are direct children of this menu.
    `void` | `setText(java.lang.String text)` Sets the menu's text.
    `void` | `setText(StringProperty text)` Sets the menu's text.

    - ### Methods inherited from class com.hp.lft.sdk.java.UiObjectBaseDescription

      `getAbsoluteLocation, getAttachedText, getBackgroundColor, getForegroundColor, getLabel, getLocation, getNativeClass, getObjectName, getPath, getSize, getTagName, isEnabled, isFocused, isVisible, setAbsoluteLocation, setAbsoluteLocation, setAbsoluteLocation, setAttachedText, setAttachedText, setBackgroundColor, setBackgroundColor, setEnabled, setFocused, setForegroundColor, setForegroundColor, setLabel, setLabel, setLocation, setLocation, setLocation, setNativeClass, setNativeClass, setObjectName, setObjectName, setPath, setPath, setSize, setSize, setSize, setTagName, setTagName, setVisible`

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

    - #### MenuDescription

          public MenuDescription()

      Initializes a new instance of the MenuDescription class.

    - #### MenuDescription

          protected MenuDescription(MenuDescription.Init<?> init)

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

  - ### Method Detail

    - #### setSubMenusCount

          public void setSubMenusCount(java.lang.Integer count)

      Sets the number of menu items that are direct children of this menu.
      Parameters:
        `count` - the number of child menu items.

    - #### getSubMenusCount

          public java.lang.Integer getSubMenusCount()

      Returns the number of menu items that are direct children of this menu.
      Returns:
        the number of child menu items. If this is a last-level menu, returns 0.

    - #### setText

          public void setText(java.lang.String text)

      Sets the menu's text.
      Parameters:
        `text` - the text.

    - #### setText

          public void setText(StringProperty text)

      Sets the menu's text.
      Parameters:
        `text` - a `StringProperty` or `RegExpProperty`.

    - #### getText

          public StringProperty getText()

      Returns the menu's text.
      Returns:
        the text.