com.smartgwt.client.widgets.menu

## Class MenuItem

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.core.RefDataClass
      - - com.smartgwt.client.data.Record
        - - com.smartgwt.client.widgets.grid.ListGridRecord
          - - com.smartgwt.client.widgets.menu.MenuItem

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers, HasClickHandlers
  Direct Known Subclasses:
    MenuItemSeparator

      public class MenuItem
      extends ListGridRecord
      implements HasClickHandlers

  Object specifying an item in a `Menu`. Each `MenuItem` can have a `title`, `icon`, `shortcut\n keys`, optional `submenu` and various other settings. Alternatively, a `MenuItem` can contain an arbitrary widget via `embeddedComponent`. To create a Menu, create a series of MenuItems and call `Menu.setItems()`.

  Alternatively, Menus support binding to a `DataSource`.

  As another option, here's a sample of a Menu in `Component XML`:

        <Menu>
           <items>
               <MenuItem title="item1" click="alert(1)"/>
               <MenuItem title="item2"/>
           </items>
        </Menu>

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.RefDataClass

      `id`

    - ### Fields inherited from class com.smartgwt.client.core.DataClass

      `factoryCreated, factoryProperties`

    - ### Fields inherited from class com.smartgwt.client.core.JsObject

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MenuItem()`
    `MenuItem(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `MenuItem(java.lang.String title)`
    `MenuItem(java.lang.String title, java.lang.String icon)`
    `MenuItem(java.lang.String title, java.lang.String icon, java.lang.String keyTitle)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.event.shared.HandlerRegistration` | `addClickHandler(ClickHandler handler)` Add a click handler.
    `java.lang.Boolean` | `getAutoDismiss()` Whether a click on this specific `menuItem` automatically dismisses the menu.
    `java.lang.Boolean` | `getCanSelectParent()` A MenuItem that has a submenu normally cannot be selected, instead clicking or hitting Enter while keyboard focus is on the item shows the submenu.
    `java.lang.Boolean` | `getChecked()` If true, this item displays a standard checkmark image to the left of its title.
    `java.lang.String` | `getDisabledIcon()` The filename for this item's custom icon when the item is disabled.
    `Canvas` | `getEmbeddedComponent()` Arbitrary UI component that should appear in this MenuItem.
    `java.lang.String[]` | `getEmbeddedComponentFields()` See `ListGridRecord.embeddedComponentFields`.
    `EmbeddedPosition` | `getEmbeddedComponentPosition()` See `ListGridRecord.embeddedComponentPosition`, except that when used in a `menuItem`, default behavior is `EmbeddedPosition` "expand".
    `java.lang.Boolean` | `getEnabled()` Affects the visual style and interactivity of the menu item.
    `AdvancedCriteria` | `getEnableWhen()` Criteria to be evaluated to determine whether this MenuItem should be disabled.
    `java.lang.Boolean` | `getFetchSubmenus()` If false, no submenus will be fetched for this MenuItem.
    `java.lang.Boolean` | `getHidden()` Default `Menu.itemHiddenProperty` for menu items.
    `java.lang.String` | `getIcon()` The filename for this item's custom icon.
    `int` | `getIconHeight()` The height applied to this item's icon.
    `int` | `getIconWidth()` The width applied to this item's icon.
    `java.lang.Boolean` | `getIsSeparator()` When set to `true`, this menu item shows a horizontal separator instead of the `title` text.
    `java.lang.String` | `getKeyTitle()` A string to display in the shortcut-key column for this item.
    `static MenuItem` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.Boolean` | `getShowIconOnlyInline()` When used in an `AdaptiveMenu`, should this MenuItem show only it's `icon` when displayed inline?
    `Menu` | `getSubmenu()` Deprecated. use `com.smartgwt.client.widgets.Menu#getSubmenu` instead
    `java.lang.String` | `getTitle()` The text displayed for the menu item
    `AdvancedCriteria` | `getVisibleWhen()` Criteria to be evaluated to determine whether this MenuItem should be visible.
    `MenuItem` | `setAutoDismiss(java.lang.Boolean autoDismiss)` Whether a click on this specific `menuItem` automatically dismisses the menu.
    `MenuItem` | `setCanSelectParent(java.lang.Boolean canSelectParent)` A MenuItem that has a submenu normally cannot be selected, instead clicking or hitting Enter while keyboard focus is on the item shows the submenu.
    `MenuItem` | `setChecked(java.lang.Boolean checked)` If true, this item displays a standard checkmark image to the left of its title.
    `void` | `setCheckIfCondition(MenuItemIfFunction checkIf)` Contains the condition that will check or uncheck the curent menuItem.
    `MenuItem` | `setDisabledIcon(java.lang.String disabledIcon)` The filename for this item's custom icon when the item is disabled.
    `void` | `setDynamicIconFunction(MenuItemStringFunction handler)` Contains the condition that will change the curent items' icon when met.
    `void` | `setDynamicTitleFunction(MenuItemStringFunction handler)` Contains the condition that will change the curent items' title when met.
    `MenuItem` | `setEmbeddedComponent(Canvas embeddedComponent)` Arbitrary UI component that should appear in this MenuItem.
    `MenuItem` | `setEmbeddedComponentFields(java.lang.String... embeddedComponentFields)` See `ListGridRecord.embeddedComponentFields`.
    `MenuItem` | `setEmbeddedComponentPosition(EmbeddedPosition embeddedComponentPosition)` See `ListGridRecord.embeddedComponentPosition`, except that when used in a `menuItem`, default behavior is `EmbeddedPosition` "expand".
    `MenuItem` | `setEnabled(java.lang.Boolean enabled)` Affects the visual style and interactivity of the menu item.
    `void` | `setEnableIfCondition(MenuItemIfFunction enableIf)` Contains the condition that will enable or disable the curent menuItem.
    `MenuItem` | `setEnableWhen(AdvancedCriteria enableWhen)` Criteria to be evaluated to determine whether this MenuItem should be disabled.
    `MenuItem` | `setFetchSubmenus(java.lang.Boolean fetchSubmenus)` If false, no submenus will be fetched for this MenuItem.
    `MenuItem` | `setHidden(java.lang.Boolean hidden)` Default `Menu.itemHiddenProperty` for menu items.
    `MenuItem` | `setIcon(java.lang.String icon)` The filename for this item's custom icon.
    `MenuItem` | `setIconHeight(int iconHeight)` The height applied to this item's icon.
    `MenuItem` | `setIconWidth(int iconWidth)` The width applied to this item's icon.
    `MenuItem` | `setIsSeparator(java.lang.Boolean isSeparator)` When set to `true`, this menu item shows a horizontal separator instead of the `title` text.
    `void` | `setKeys(KeyIdentifier... keys)` Shortcut key(s) to fire the menu item action.
    `MenuItem` | `setKeyTitle(java.lang.String keyTitle)` A string to display in the shortcut-key column for this item.
    `MenuItem` | `setShowIconOnlyInline(java.lang.Boolean showIconOnlyInline)` When used in an `AdaptiveMenu`, should this MenuItem show only it's `icon` when displayed inline?
    `MenuItem` | `setSubmenu(Menu submenu)` A reference to another menu, to display as a submenu when the mouse cursor hovers over this menu item.
    `MenuItem` | `setTitle(java.lang.String title)` The text displayed for the menu item
    `MenuItem` | `setVisibleWhen(AdvancedCriteria visibleWhen)` Criteria to be evaluated to determine whether this MenuItem should be visible.

    - ### Methods inherited from class com.smartgwt.client.widgets.grid.ListGridRecord

      `get_baseStyle, get_canEdit, get_canRemove, getBackgroundComponent, getCanAcceptDrop, getCanDrag, getCanExpand, getCanSelect, getCustomStyle, getDetailDS, getIncludeInSummary, getIsGridSummary, getIsGroupSummary, getLinkText, getShowRollOver, getSingleCellValue, set_baseStyle, set_canEdit, set_canRemove, setBackgroundComponent, setCanAcceptDrop, setCanDrag, setCanExpand, setCanSelect, setCustomStyle, setDetailDS, setIncludeInSummary, setIsGridSummary, setIsGroupSummary, setLinkText, setShowRollOver, setSingleCellValue`

    - ### Methods inherited from class com.smartgwt.client.data.Record

      `convertToRecordArray, copyAttributes, copyAttributesInto, getAttributeAsRecordArray, getAttributeAsRecordList, getPaletteDefaults, isARecord, toMap`

    - ### Methods inherited from class com.smartgwt.client.core.RefDataClass

      `getRef, getRef, internalSetID`

    - ### Methods inherited from class com.smartgwt.client.core.DataClass

      `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

    - ### Methods inherited from class com.smartgwt.client.core.JsObject

      `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

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

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

      `fireEvent`

- - ### Constructor Detail

    - #### MenuItem

          public MenuItem()

    - #### MenuItem

          public MenuItem(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### MenuItem

          public MenuItem(java.lang.String title)

    - #### MenuItem

          public MenuItem(java.lang.String title,
                          java.lang.String icon)

    - #### MenuItem

          public MenuItem(java.lang.String title,
                          java.lang.String icon,
                          java.lang.String keyTitle)

  - ### Method Detail

    - #### getOrCreateRef

          public static MenuItem getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setAutoDismiss

          public MenuItem setAutoDismiss(java.lang.Boolean autoDismiss)

      Whether a click on this specific `menuItem` automatically dismisses the menu. See `Menu.autoDismiss`.
      Parameters:
        `autoDismiss` - New autoDismiss value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls

    - #### getAutoDismiss

          public java.lang.Boolean getAutoDismiss()

      Whether a click on this specific `menuItem` automatically dismisses the menu. See `Menu.autoDismiss`.
      Returns:
        Current autoDismiss value. Default value is null

    - #### setCanSelectParent

          public MenuItem setCanSelectParent(java.lang.Boolean canSelectParent)

      A MenuItem that has a submenu normally cannot be selected, instead clicking or hitting Enter while keyboard focus is on the item shows the submenu. Setting canSelectParent:true allows a menu item with a submenu to be selected directly.
      Parameters:
        `canSelectParent` - New canSelectParent value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls

    - #### getCanSelectParent

          public java.lang.Boolean getCanSelectParent()

      A MenuItem that has a submenu normally cannot be selected, instead clicking or hitting Enter while keyboard focus is on the item shows the submenu. Setting canSelectParent:true allows a menu item with a submenu to be selected directly.
      Returns:
        Current canSelectParent value. Default value is null

    - #### setChecked

          public MenuItem setChecked(java.lang.Boolean checked)

      If true, this item displays a standard checkmark image to the left of its title. You can set the checkmark image URL by setting `Menu.checkmarkImage`.

      If you need to set this state dynamically, use `checkIf()` instead.

      Parameters:
        `checked` - New checked value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        Appearance Example

    - #### getChecked

          public java.lang.Boolean getChecked()

      If true, this item displays a standard checkmark image to the left of its title. You can set the checkmark image URL by setting `Menu.checkmarkImage`.

      If you need to set this state dynamically, use `checkIf()` instead.

      Returns:
        Current checked value. Default value is null
      See Also:
        Appearance Example

    - #### setDisabledIcon

          public MenuItem setDisabledIcon(java.lang.String disabledIcon)

      The filename for this item's custom icon when the item is disabled. If both this property and `checked` are both specified, only the icon specified by this property will be displayed. The path to the loaded skin directory and the skinImgDir are prepended to this filename to form the full URL.

      If you need to set this state dynamically, use `dynamicIcon()` instead.

      Parameters:
        `disabledIcon` - New disabledIcon value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        Appearance Example

    - #### getDisabledIcon

          public java.lang.String getDisabledIcon()

      The filename for this item's custom icon when the item is disabled. If both this property and `checked` are both specified, only the icon specified by this property will be displayed. The path to the loaded skin directory and the skinImgDir are prepended to this filename to form the full URL.

      If you need to set this state dynamically, use `dynamicIcon()` instead.

      Returns:
        Current disabledIcon value. Default value is null
      See Also:
        Appearance Example

    - #### setEmbeddedComponent

          public MenuItem setEmbeddedComponent(Canvas embeddedComponent)

      Arbitrary UI component that should appear in this MenuItem. See `ListGridRecord.embeddedComponent` for an overview and options for controlling placement.

      When `embeddedComponent` is used in a MenuItem certain default behaviors apply:

      - `autoDismiss` defaults to false and clicks on embeddedComponents are not bubbled to the menuItem - if an interaction with an embeddedComponent is expected to dismiss the menu, custom code should call menu.`hide` or `hideAllMenus` as appropriate, before proceeding
      - the default behavior for `embeddedComponentPosition` is "expand".
      - the component is placed over the title and key fields by default - use `embeddedComponentFields` to override
      - rollOver styling is disabled by default (as though `ListGridRecord.showRollOver` were set to false)
      Overrides:
        `setEmbeddedComponent` in class `ListGridRecord`
      Parameters:
        `embeddedComponent` - New embeddedComponent value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        `Appearance overview and related methods`

    - #### getEmbeddedComponent

          public Canvas getEmbeddedComponent()

      Arbitrary UI component that should appear in this MenuItem. See `ListGridRecord.embeddedComponent` for an overview and options for controlling placement.

      When `embeddedComponent` is used in a MenuItem certain default behaviors apply:

      - `autoDismiss` defaults to false and clicks on embeddedComponents are not bubbled to the menuItem - if an interaction with an embeddedComponent is expected to dismiss the menu, custom code should call menu.`hide` or `hideAllMenus` as appropriate, before proceeding
      - the default behavior for `embeddedComponentPosition` is "expand".
      - the component is placed over the title and key fields by default - use `embeddedComponentFields` to override
      - rollOver styling is disabled by default (as though `ListGridRecord.showRollOver` were set to false)
      Overrides:
        `getEmbeddedComponent` in class `ListGridRecord`
      Returns:
        Current embeddedComponent value. Default value is null
      See Also:
        `Appearance overview and related methods`

    - #### setEmbeddedComponentFields

          public MenuItem setEmbeddedComponentFields(java.lang.String... embeddedComponentFields)

      See `ListGridRecord.embeddedComponentFields`. Default for a MenuItem is to cover the title and key fields, leaving the icon and submenu fields visible.
      Overrides:
        `setEmbeddedComponentFields` in class `ListGridRecord`
      Parameters:
        `embeddedComponentFields` - New embeddedComponentFields value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        `Appearance overview and related methods`

    - #### getEmbeddedComponentFields

          public java.lang.String[] getEmbeddedComponentFields()

      See `ListGridRecord.embeddedComponentFields`. Default for a MenuItem is to cover the title and key fields, leaving the icon and submenu fields visible.
      Overrides:
        `getEmbeddedComponentFields` in class `ListGridRecord`
      Returns:
        Current embeddedComponentFields value. Default value is null
      See Also:
        `Appearance overview and related methods`

    - #### setEmbeddedComponentPosition

          public MenuItem setEmbeddedComponentPosition(EmbeddedPosition embeddedComponentPosition)

      See `ListGridRecord.embeddedComponentPosition`, except that when used in a `menuItem`, default behavior is `EmbeddedPosition` "expand".
      Overrides:
        `setEmbeddedComponentPosition` in class `ListGridRecord`
      Parameters:
        `embeddedComponentPosition` - New embeddedComponentPosition value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        `Appearance overview and related methods`

    - #### getEmbeddedComponentPosition

          public EmbeddedPosition getEmbeddedComponentPosition()

      See `ListGridRecord.embeddedComponentPosition`, except that when used in a `menuItem`, default behavior is `EmbeddedPosition` "expand".
      Overrides:
        `getEmbeddedComponentPosition` in class `ListGridRecord`
      Returns:
        Current embeddedComponentPosition value. Default value is null
      See Also:
        `Appearance overview and related methods`

    - #### setEnabled

          public MenuItem setEnabled(java.lang.Boolean enabled)

      Affects the visual style and interactivity of the menu item. If set to `false`, the menu item will not respond to mouse rollovers or clicks.

      If you need to set this state dynamically, use `enableIf()` instead.

      Overrides:
        `setEnabled` in class `ListGridRecord`
      Parameters:
        `enabled` - New enabled value. Default value is true
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        Disabled rows Example

    - #### getEnabled

          public java.lang.Boolean getEnabled()

      Affects the visual style and interactivity of the menu item. If set to `false`, the menu item will not respond to mouse rollovers or clicks.

      If you need to set this state dynamically, use `enableIf()` instead.

      Overrides:
        `getEnabled` in class `ListGridRecord`
      Returns:
        Current enabled value. Default value is true
      See Also:
        Disabled rows Example

    - #### setEnableWhen

          public MenuItem setEnableWhen(AdvancedCriteria enableWhen)

      Criteria to be evaluated to determine whether this MenuItem should be disabled. Re-evaluated each time the menu is shown.

      A basic criteria uses textMatchStyle:"exact". When specified in `Component XML` this property allows `shorthand formats` for defining criteria.

      Parameters:
        `enableWhen` - New enableWhen value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        `RuleCriteria overview and related methods`

    - #### getEnableWhen

          public AdvancedCriteria getEnableWhen()

      Criteria to be evaluated to determine whether this MenuItem should be disabled. Re-evaluated each time the menu is shown.

      A basic criteria uses textMatchStyle:"exact". When specified in `Component XML` this property allows `shorthand formats` for defining criteria.

      Returns:
        Current enableWhen value. Default value is null
      See Also:
        `RuleCriteria overview and related methods`

    - #### setFetchSubmenus

          public MenuItem setFetchSubmenus(java.lang.Boolean fetchSubmenus)

      If false, no submenus will be fetched for this MenuItem. This can be set globally via `Menu.fetchSubmenus`.
      Parameters:
        `fetchSubmenus` - New fetchSubmenus value. Default value is true
      Returns:
        `MenuItem` instance, for chaining setter calls

    - #### getFetchSubmenus

          public java.lang.Boolean getFetchSubmenus()

      If false, no submenus will be fetched for this MenuItem. This can be set globally via `Menu.fetchSubmenus`.
      Returns:
        Current fetchSubmenus value. Default value is true

    - #### setHidden

          public MenuItem setHidden(java.lang.Boolean hidden)

      Default `Menu.itemHiddenProperty` for menu items. If true, this item will be hidden wihin the menu by default.

      To update item visibility at runtime, call `Menu.setItemHidden()`

      Parameters:
        `hidden` - New hidden value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        `Menu.setFilterHiddenItems(java.lang.Boolean)`, Appearance Example

    - #### getHidden

          public java.lang.Boolean getHidden()

      Default `Menu.itemHiddenProperty` for menu items. If true, this item will be hidden wihin the menu by default.

      To update item visibility at runtime, call `Menu.setItemHidden()`

      Returns:
        Current hidden value. Default value is null
      See Also:
        `Menu.getFilterHiddenItems()`, Appearance Example

    - #### setIcon

          public MenuItem setIcon(java.lang.String icon)

      The filename for this item's custom icon. If both this property and `checked` are both specified, only the icon specified by this property will be displayed. The path to the loaded skin directory and the skinImgDir are prepended to this filename to form the full URL. If this item is disabled, and `disabledIcon` is set, then that icon will be used instead.

      If you need to set this state dynamically, use `dynamicIcon()` instead.

      Parameters:
        `icon` - New icon value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        Appearance Example

    - #### getIcon

          public java.lang.String getIcon()

      The filename for this item's custom icon. If both this property and `checked` are both specified, only the icon specified by this property will be displayed. The path to the loaded skin directory and the skinImgDir are prepended to this filename to form the full URL. If this item is disabled, and `disabledIcon` is set, then that icon will be used instead.

      If you need to set this state dynamically, use `dynamicIcon()` instead.

      Returns:
        Current icon value. Default value is null
      See Also:
        Appearance Example

    - #### setIconHeight

          public MenuItem setIconHeight(int iconHeight)

      The height applied to this item's icon. The default of `16` can be changed for all MenuItems by overriding `Menu.iconHeight`.
      Parameters:
        `iconHeight` - New iconHeight value. Default value is 16
      Returns:
        `MenuItem` instance, for chaining setter calls

    - #### getIconHeight

          public int getIconHeight()

      The height applied to this item's icon. The default of `16` can be changed for all MenuItems by overriding `Menu.iconHeight`.
      Returns:
        Current iconHeight value. Default value is 16

    - #### setIconWidth

          public MenuItem setIconWidth(int iconWidth)

      The width applied to this item's icon. The default of `16` can be changed for all MenuItems by overriding `Menu.iconWidth`.
      Parameters:
        `iconWidth` - New iconWidth value. Default value is 16
      Returns:
        `MenuItem` instance, for chaining setter calls

    - #### getIconWidth

          public int getIconWidth()

      The width applied to this item's icon. The default of `16` can be changed for all MenuItems by overriding `Menu.iconWidth`.
      Returns:
        Current iconWidth value. Default value is 16

    - #### setIsSeparator

          public MenuItem setIsSeparator(java.lang.Boolean isSeparator)

      When set to `true`, this menu item shows a horizontal separator instead of the `title` text. Typically specified as the only property of a menu item, since the separator will not respond to mouse events.
      Overrides:
        `setIsSeparator` in class `ListGridRecord`
      Parameters:
        `isSeparator` - New isSeparator value. Default value is false
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        Appearance Example

    - #### getIsSeparator

          public java.lang.Boolean getIsSeparator()

      When set to `true`, this menu item shows a horizontal separator instead of the `title` text. Typically specified as the only property of a menu item, since the separator will not respond to mouse events.
      Overrides:
        `getIsSeparator` in class `ListGridRecord`
      Returns:
        Current isSeparator value. Default value is false
      See Also:
        Appearance Example

    - #### setKeyTitle

          public MenuItem setKeyTitle(java.lang.String keyTitle)

      A string to display in the shortcut-key column for this item. If not specified, the first KeyName value in `keys` will be used by default.
      Parameters:
        `keyTitle` - New keyTitle value. Default value is see below
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        Appearance Example

    - #### getKeyTitle

          public java.lang.String getKeyTitle()

      A string to display in the shortcut-key column for this item. If not specified, the first KeyName value in `keys` will be used by default.
      Returns:
        Current keyTitle value. Default value is see below
      See Also:
        Appearance Example

    - #### setShowIconOnlyInline

          public MenuItem setShowIconOnlyInline(java.lang.Boolean showIconOnlyInline)

      When used in an `AdaptiveMenu`, should this MenuItem show only it's `icon` when displayed inline?
      Parameters:
        `showIconOnlyInline` - New showIconOnlyInline value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls

    - #### getShowIconOnlyInline

          public java.lang.Boolean getShowIconOnlyInline()

      When used in an `AdaptiveMenu`, should this MenuItem show only it's `icon` when displayed inline?
      Returns:
        Current showIconOnlyInline value. Default value is null

    - #### setSubmenu

          public MenuItem setSubmenu(Menu submenu)

      A reference to another menu, to display as a submenu when the mouse cursor hovers over this menu item.
      Parameters:
        `submenu` - New submenu value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        Appearance Example

    - #### setTitle

          public MenuItem setTitle(java.lang.String title)

      The text displayed for the menu item
      Parameters:
        `title` - New title value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        `HTMLString`

    - #### getTitle

          public java.lang.String getTitle()

      The text displayed for the menu item
      Returns:
        Current title value. Default value is null
      See Also:
        `HTMLString`

    - #### setVisibleWhen

          public MenuItem setVisibleWhen(AdvancedCriteria visibleWhen)

      Criteria to be evaluated to determine whether this MenuItem should be visible. Re-evaluated each time the menu is shown.

      A basic criteria uses textMatchStyle:"exact". When specified in `Component XML` this property allows `shorthand formats` for defining criteria.

      Parameters:
        `visibleWhen` - New visibleWhen value. Default value is null
      Returns:
        `MenuItem` instance, for chaining setter calls
      See Also:
        `RuleCriteria overview and related methods`

    - #### getVisibleWhen

          public AdvancedCriteria getVisibleWhen()

      Criteria to be evaluated to determine whether this MenuItem should be visible. Re-evaluated each time the menu is shown.

      A basic criteria uses textMatchStyle:"exact". When specified in `Component XML` this property allows `shorthand formats` for defining criteria.

      Returns:
        Current visibleWhen value. Default value is null
      See Also:
        `RuleCriteria overview and related methods`

    - #### addClickHandler

          public com.google.gwt.event.shared.HandlerRegistration addClickHandler(ClickHandler handler)

      Add a click handler.

      Executed when this menu item is clicked by the user. The click handler must be specified as a function or string of script. Call `com.smartgwt.client.widgets.menu.events.MenuItemClickEvent#cancel()` from within `ClickHandler.onClick(com.smartgwt.client.widgets.menu.events.MenuItemClickEvent)` to suppress the `Menu.itemClick()` handler if specified.

      Specified by:
        `addClickHandler` in interface `HasClickHandlers`
      Parameters:
        `handler` - the click handler
      Returns:
        `HandlerRegistration` used to remove this handler

    - #### setKeys

          public void setKeys(KeyIdentifier... keys)

      Shortcut key(s) to fire the menu item action. Each key can be defined as a `KeyIdentifier`. To apply multiple shortcut keys to this item, set this property to an array of such key identifiers.
      Parameters:
        `keys` - keys Default value is null

    - #### setEnableIfCondition

          public void setEnableIfCondition(MenuItemIfFunction enableIf)

      Contains the condition that will enable or disable the curent menuItem. The handler must be specified as a function or string of script. Return false to disable the menuItem or true to enable it

      If you don't need to set this state dynamically, use `enabled` instead.

    - #### setCheckIfCondition

          public void setCheckIfCondition(MenuItemIfFunction checkIf)

      Contains the condition that will check or uncheck the curent menuItem. The handler must be specified as a function or string of script. Return false to uncheck the menuItem or true to check it

      If you don't need to set this state dynamically, use `checked` instead.

    - #### setDynamicTitleFunction

          public void setDynamicTitleFunction(MenuItemStringFunction handler)

      Contains the condition that will change the curent items' title when met. The handler must be specified as a function or string of script.

      If you don't need to set this state dynamically, use `title` instead.

    - #### setDynamicIconFunction

          public void setDynamicIconFunction(MenuItemStringFunction handler)

      Contains the condition that will change the curent items' icon when met. The handler must be specified as a function or string of script.

      If you don't need to set this state dynamically, use `icon` instead.

    - #### getSubmenu

          @Deprecated
          public Menu getSubmenu()

      Deprecated. use `com.smartgwt.client.widgets.Menu#getSubmenu` instead
      A reference to another menu, to display as a submenu when the mouse cursor hovers over this menu item.
      Returns:
        Menu
      See Also:
        Appearance Example