Class NavItem

All Implemented Interfaces:
HasHandlers

public class NavItem extends TreeNode
Properties for a navigation item in a NavPanel.
  • Constructor Details

  • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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: