com.smartgwt.client.widgets.layout

## Class NavItem

- 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.tree.TreeNode
            - - com.smartgwt.client.widgets.layout.NavItem

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class NavItem
      extends TreeNode

  Properties for a navigation item in a `NavPanel`.

- - ### 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
    `NavItem()`
    `NavItem(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getCustomStyle()` CSS style name used for this `NavItem`.
    `AdvancedCriteria` | `getEnableWhen()` Criteria to be evaluated to determine whether this NavItem should be disabled.
    `java.lang.String` | `getIcon()` Icon to show for this `NavItem`.
    `java.lang.String` | `getId()` An optional ID for this `NavItem`.
    `java.lang.Boolean` | `getIsHeader()` If set, this `NavItem` will be styled like a header.
    `java.lang.Boolean` | `getIsSeparator()` If set, this `NavItem` will be styled as a separator.
    `NavItem[]` | `getItems()` Optional subitems of this `NavItem`.
    `static NavItem` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `Canvas` | `getPane()` Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
    `java.lang.String` | `getPaneAsString()` Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
    `java.lang.String` | `getTitle()` Title to show for this `NavItem`.
    `NavItem` | `setCustomStyle(java.lang.String customStyle)` CSS style name used for this `NavItem`.
    `NavItem` | `setEnableWhen(AdvancedCriteria enableWhen)` Criteria to be evaluated to determine whether this NavItem should be disabled.
    `NavItem` | `setIcon(java.lang.String icon)` Icon to show for this `NavItem`.
    `NavItem` | `setId(java.lang.String id)` An optional ID for this `NavItem`.
    `NavItem` | `setIsHeader(java.lang.Boolean isHeader)` If set, this `NavItem` will be styled like a header.
    `NavItem` | `setIsSeparator(java.lang.Boolean isSeparator)` If set, this `NavItem` will be styled as a separator.
    `NavItem` | `setItems(NavItem... items)` Optional subitems of this `NavItem`.
    `NavItem` | `setPane(Canvas pane)` Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
    `NavItem` | `setPane(java.lang.String pane)` Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
    `NavItem` | `setTitle(java.lang.String title)` Title to show for this `NavItem`.

    - ### Methods inherited from class com.smartgwt.client.widgets.tree.TreeNode

      `getCanAcceptDrop, getCanDrag, getEnabled, getIconPadding, getName, getShowDropIcon, getShowOpenIcon, getShowSelectedIcon, setCanAcceptDrop, setCanDrag, setChildren, setEnabled, setIconPadding, setID, setIsFolder, setName, setParentID, setShowDropIcon, setShowOpenIcon, setShowSelectedIcon`

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

      `get_baseStyle, get_canEdit, get_canRemove, getBackgroundComponent, getCanExpand, getCanSelect, getDetailDS, getEmbeddedComponent, getEmbeddedComponentFields, getEmbeddedComponentPosition, getIncludeInSummary, getIsGridSummary, getIsGroupSummary, getLinkText, getShowRollOver, getSingleCellValue, set_baseStyle, set_canEdit, set_canRemove, setBackgroundComponent, setCanExpand, setCanSelect, setDetailDS, setEmbeddedComponent, setEmbeddedComponentFields, setEmbeddedComponentPosition, 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`

- - ### Constructor Detail

    - #### NavItem

          public NavItem()

    - #### NavItem

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

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### setCustomStyle

          public NavItem setCustomStyle(java.lang.String customStyle)

      CSS style name used for this `NavItem`. If set and this `NavItem` is a `header`, this overrides the `NavPanel`'s `NavPanel.headerStyle`.
      Overrides:
        `setCustomStyle` in class `ListGridRecord`
      Parameters:
        `customStyle` - New customStyle value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls
      See Also:
        `CSSStyleName`

    - #### getCustomStyle

          public java.lang.String getCustomStyle()

      CSS style name used for this `NavItem`. If set and this `NavItem` is a `header`, this overrides the `NavPanel`'s `NavPanel.headerStyle`.
      Overrides:
        `getCustomStyle` in class `ListGridRecord`
      Returns:
        Current customStyle value. Default value is null
      See Also:
        `CSSStyleName`

    - #### setEnableWhen

          public NavItem setEnableWhen(AdvancedCriteria enableWhen)

      Criteria to be evaluated to determine whether this NavItem should be disabled.

      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:
        `NavItem` instance, for chaining setter calls
      See Also:
        `Dynamic Rules`

    - #### getEnableWhen

          public AdvancedCriteria getEnableWhen()

      Criteria to be evaluated to determine whether this NavItem should be disabled.

      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:
        `Dynamic Rules`

    - #### setIcon

          public NavItem setIcon(java.lang.String icon)

      Icon to show for this `NavItem`. If not specified, the `navGrid's folderIcon` is used.
      Overrides:
        `setIcon` in class `TreeNode`
      Parameters:
        `icon` - New icon value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls
      See Also:
        `SCImgURL`

    - #### getIcon

          public java.lang.String getIcon()

      Icon to show for this `NavItem`. If not specified, the `navGrid's folderIcon` is used.
      Overrides:
        `getIcon` in class `TreeNode`
      Returns:
        Current icon value. Default value is null
      See Also:
        `SCImgURL`

    - #### setId

          public NavItem setId(java.lang.String id)

      An optional ID for this `NavItem`. If specified, this must be unique within the `NavPanel`.
      Parameters:
        `id` - New id value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls
      See Also:
        `Identifier`

    - #### getId

          public java.lang.String getId()

      An optional ID for this `NavItem`. If specified, this must be unique within the `NavPanel`.
      Returns:
        Current id value. Default value is null
      See Also:
        `Identifier`

    - #### setIsHeader

          public NavItem setIsHeader(java.lang.Boolean isHeader)

      If set, this `NavItem` will be styled like a header. In this case `pane` is ignored and nothing happens when the header is clicked. However, `items` can still be configured to place items hierarchically under the header.
      Parameters:
        `isHeader` - New isHeader value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls

    - #### getIsHeader

          public java.lang.Boolean getIsHeader()

      If set, this `NavItem` will be styled like a header. In this case `pane` is ignored and nothing happens when the header is clicked. However, `items` can still be configured to place items hierarchically under the header.
      Returns:
        Current isHeader value. Default value is null

    - #### setIsSeparator

          public NavItem setIsSeparator(java.lang.Boolean isSeparator)

      If set, this `NavItem` will be styled as a separator. A separator does not have a `pane` and nothing happens when the separator is clicked.
      Overrides:
        `setIsSeparator` in class `ListGridRecord`
      Parameters:
        `isSeparator` - New isSeparator value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls

    - #### getIsSeparator

          public java.lang.Boolean getIsSeparator()

      If set, this `NavItem` will be styled as a separator. A separator does not have a `pane` and nothing happens when the separator is clicked.
      Overrides:
        `getIsSeparator` in class `ListGridRecord`
      Returns:
        Current isSeparator value. Default value is null

    - #### setItems

          public NavItem setItems(NavItem... items)

      Optional subitems of this `NavItem`.
      Parameters:
        `items` - New items value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls

    - #### getItems

          public NavItem[] getItems()

      Optional subitems of this `NavItem`.
      Returns:
        Current items value. Default value is null

    - #### setPane

          public NavItem setPane(Canvas pane)

      Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.

      A component can be provided directly, or its ID can be provided.

      Parameters:
        `pane` - New pane value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls

    - #### getPane

          public Canvas getPane()

      Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.

      A component can be provided directly, or its ID can be provided.

      Returns:
        Current pane value. Default value is null

    - #### setPane

          public NavItem setPane(java.lang.String pane)

      Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.

      A component can be provided directly, or its ID can be provided.

      Parameters:
        `pane` - New pane value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls
      See Also:
        `Identifier`

    - #### getPaneAsString

          public java.lang.String getPaneAsString()

      Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.

      A component can be provided directly, or its ID can be provided.

      Returns:
        Current pane value. Default value is null
      See Also:
        `Identifier`

    - #### setTitle

          public NavItem setTitle(java.lang.String title)

      Title to show for this `NavItem`.
      Overrides:
        `setTitle` in class `TreeNode`
      Parameters:
        `title` - New title value. Default value is null
      Returns:
        `NavItem` instance, for chaining setter calls
      See Also:
        `HTMLString`

    - #### getTitle

          public java.lang.String getTitle()

      Title to show for this `NavItem`.
      Overrides:
        `getTitle` in class `TreeNode`
      Returns:
        Current title value. Default value is null
      See Also:
        `HTMLString`