Package com.helger.photon.core.menu.ui
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 Summary
Modifier and TypeMethodDescriptionvoid
onLevelDown
(T aNewLevel) Called when a new sub-level is enteredvoid
Called when a sub-level is leftvoid
onMenuItemExternalItem
(ISimpleWebExecutionContext aSWEC, com.helger.html.hc.html.grouping.HCLI aLI, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded) Callback invoked on the created node.void
onMenuItemPageItem
(ISimpleWebExecutionContext aSWEC, com.helger.html.hc.html.grouping.HCLI aLI, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded) Callback invoked on the created node.void
onMenuSeparatorItem
(ISimpleWebExecutionContext aSWEC, com.helger.html.hc.html.grouping.HCLI aLI) Callback invoked on the created node.com.helger.html.hc.IHCNode
renderMenuItemExternal
(ISimpleWebExecutionContext aSWEC, IMenuItemExternal aMenuItem, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded) Render a menu item with an external linkcom.helger.html.hc.IHCNode
renderMenuItemPage
(ISimpleWebExecutionContext aSWEC, IMenuItemPage aMenuItem, boolean bHasChildren, boolean bIsSelected, boolean bIsExpanded) Render a menu item on a pagecom.helger.html.hc.IHCNode
renderSeparator
(ISimpleWebExecutionContext aSWEC, IMenuSeparator aSeparator)
-
Method Details
-
onLevelDown
Called when a new sub-level is entered- Parameters:
aNewLevel
- The new UL to be modified
-
onLevelUp
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 benull
.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 benull
.aLI
- HCNodebHasChildren
-true
if the menu item has childrenbIsSelected
-true
if the menu item is a selected menu itembIsExpanded
-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 benull
.aLI
- HCNodebHasChildren
-true
if the menu item has childrenbIsSelected
-true
if the menu item is a selected menu itembIsExpanded
-true
if the menu item is expanded