Interface IMenuItemRenderer<T extends com.helger.html.hc.html.grouping.IHCList<?,com.helger.html.hc.html.grouping.HCLI>>

Type Parameters:
T - Parent element type
All Known Implementing Classes:
AbstractMenuItemRenderer, DefaultMenuItemRenderer

public interface IMenuItemRenderer<T extends com.helger.html.hc.html.grouping.IHCList<?,com.helger.html.hc.html.grouping.HCLI>>
Interface for rendering menu objects
Author:
Philip Helger
  • Method Details

    • renderSeparator

      @Nonnull com.helger.html.hc.IHCNode renderSeparator(@Nonnull ISimpleWebExecutionContext aSWEC, @Nonnull IMenuSeparator aSeparator)
      Parameters:
      aSWEC - Web execution context. May not be null.
      aSeparator - The separator to be rendered.
      Returns:
      The rendered menu separator. May not be null.
    • renderMenuItemPage

      @Nonnull com.helger.html.hc.IHCNode renderMenuItemPage(@Nonnull ISimpleWebExecutionContext aSWEC, @Nonnull IMenuItemPage aMenuItem, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded)
      Render a menu item on a page
      Parameters:
      aSWEC - Web execution context. May not be null.
      aMenuItem - The menu item to be rendered.
      bHasChildren - true if the menu item has children
      bIsSelected - true if the menu item is a selected menu item
      bIsExpanded - true if the menu item is expanded
      Returns:
      The rendered menu item. May not be null.
    • renderMenuItemExternal

      @Nonnull com.helger.html.hc.IHCNode renderMenuItemExternal(@Nonnull ISimpleWebExecutionContext aSWEC, @Nonnull IMenuItemExternal aMenuItem, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded)
      Render a menu item with an external link
      Parameters:
      aSWEC - Web execution context. May not be null.
      aMenuItem - The menu item to be rendered.
      bHasChildren - true if the menu item has children
      bIsSelected - true if the menu item is a selected menu item
      bIsExpanded - true if the menu item is expanded
      Returns:
      The rendered menu item. May not be null.
    • onLevelDown

      void onLevelDown(@Nonnull T aNewLevel)
      Called when a new sub-level is entered
      Parameters:
      aNewLevel - The new UL to be modified
    • onLevelUp

      void onLevelUp(@Nonnull T aLastLevel)
      Called when a sub-level is left
      Parameters:
      aLastLevel - The last UL that was used
    • onMenuSeparatorItem

      void onMenuSeparatorItem(@Nonnull ISimpleWebExecutionContext aSWEC, @Nonnull com.helger.html.hc.html.grouping.HCLI aLI)
      Callback invoked on the created node.
      Parameters:
      aSWEC - Web execution context. May not be null.
      aLI - HCNode
    • onMenuItemPageItem

      void onMenuItemPageItem(@Nonnull ISimpleWebExecutionContext aSWEC, @Nonnull com.helger.html.hc.html.grouping.HCLI aLI, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded)
      Callback invoked on the created node.
      Parameters:
      aSWEC - Web execution context. May not be null.
      aLI - HCNode
      bHasChildren - true if the menu item has children
      bIsSelected - true if the menu item is a selected menu item
      bIsExpanded - true if the menu item is expanded
    • onMenuItemExternalItem

      void onMenuItemExternalItem(@Nonnull ISimpleWebExecutionContext aSWEC, @Nonnull com.helger.html.hc.html.grouping.HCLI aLI, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded)
      Callback invoked on the created node.
      Parameters:
      aSWEC - Web execution context. May not be null.
      aLI - HCNode
      bHasChildren - true if the menu item has children
      bIsSelected - true if the menu item is a selected menu item
      bIsExpanded - true if the menu item is expanded