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`.
    `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`.
    `void` | `setCustomStyle(java.lang.String customStyle)` CSS style name used for this `NavItem`.
    `void` | `setIcon(java.lang.String icon)` Icon to show for this `NavItem`.
    `void` | `setId(java.lang.String id)` An optional ID for this `NavItem`.
    `void` | `setIsHeader(java.lang.Boolean isHeader)` If set, this `NavItem` will be styled like a header.
    `void` | `setIsSeparator(java.lang.Boolean isSeparator)` If set, this `NavItem` will be styled as a separator.
    `void` | `setItems(NavItem... items)` Optional subitems of this `NavItem`.
    `void` | `setPane(Canvas pane)` Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
    `void` | `setPane(java.lang.String pane)` Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
    `void` | `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, 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 void 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
      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`

    - #### setIcon

          public void 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
      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 void 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
      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 void 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

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

    - #### 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 void setItems(NavItem... items)

      Optional subitems of this `NavItem`.
      Parameters:
        `items` - New items value. Default value is null

    - #### getItems

          public NavItem[] getItems()

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

    - #### setPane

          public void 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

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