Package 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:
  `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
  Description
  `NavItem()`
  `NavItem(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getCustomStyle()`
  CSS style name used for this `NavItem`.
  `AdvancedCriteria`
  `getEnableWhen()`
  Criteria to be evaluated to determine whether this NavItem should be disabled.
  `String`
  `getIcon()`
  Icon to show for this `NavItem`.
  `String`
  `getId()`
  An optional ID for this `NavItem`.
  `Boolean`
  `getIsHeader()`
  If set, this `NavItem` will be styled like a header.
  `Boolean`
  `getIsSeparator()`
  If set, this `NavItem` will be styled as a separator.
  `NavItem[]`
  `getItems()`
  Optional subitems of this `NavItem`.
  `static NavItem`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `Canvas`
  `getPane()`
  Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
  `String`
  `getPaneAsString()`
  Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
  `String`
  `getTitle()`
  Title to show for this `NavItem`.
  `NavItem`
  `setCustomStyle(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(String icon)`
  Icon to show for this `NavItem`.
  `NavItem`
  `setId(String id)`
  An optional ID for this `NavItem`.
  `NavItem`
  `setIsHeader(Boolean isHeader)`
  If set, this `NavItem` will be styled like a header.
  `NavItem`
  `setIsSeparator(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(String pane)`
  Component to display in the `NavPanel.navDeck` when this `NavItem` is selected.
  `NavItem`
  `setTitle(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 Details

  - ### NavItem

    public NavItem()

  - ### NavItem

    public NavItem(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static NavItem getOrCreateRef(JavaScriptObject jsObj)

  - ### setCustomStyle

    public NavItem setCustomStyle(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 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(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 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(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 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(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 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(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 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(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 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(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 String getTitle()
    Title to show for this `NavItem`.
    Overrides:
      `getTitle` in class `TreeNode`
    Returns:
      Current title value. Default value is null
    See Also:
      - `HTMLString`