| Modifier and Type | Method and Description |
|---|---|
IMenuItemPage |
createItem(IMenuItem aParent,
IPage aPage)
Append a new menu item below the specified parent.
|
IMenuItemExternal |
createItem(IMenuItem aParent,
String sItemID,
com.helger.commons.url.ISimpleURL aURL,
com.helger.commons.name.IHasDisplayText aName)
Append a new menu item below the specified parent.
|
IMenuItemPage |
createItem(String sParentID,
IPage aPage)
Append a new menu item below the specified parent.
|
IMenuItemPage |
createItem(String sParentID,
String sItemID,
IPage aPage)
Append a new menu item below the specified parent.
|
IMenuItemExternal |
createItem(String sParentID,
String sItemID,
com.helger.commons.url.ISimpleURL aURL,
com.helger.commons.name.IHasDisplayText aName)
Append a new menu item below the specified parent.
|
IMenuItemPage |
createRootItem(IPage aPage)
Append a new menu item at root level.
|
IMenuItemPage |
createRootItem(String sItemID,
IPage aPage)
Append a new menu item at root level.
|
IMenuItemExternal |
createRootItem(String sItemID,
com.helger.commons.url.ISimpleURL aURL,
com.helger.commons.name.IHasDisplayText aName)
Append a new menu item at root level.
|
IMenuSeparator |
createRootSeparator()
Append a new menu item separator at root level
|
IMenuSeparator |
createSeparator(IMenuItem aParent)
Append a new menu item separator as a child of the passed menu item
|
IMenuSeparator |
createSeparator(String sParentID)
Append a new menu item separator as a child of the passed menu item
|
List<String> |
getAllDefaultMenuItemIDs() |
List<IMenuItemPage> |
getAllDefaultMenuItems()
Get the default menu item objects in the correct order.
|
IMenuItemPage |
getDefaultMenuItem()
Get the default menu item object.
|
String |
getDefaultMenuItemID()
Get the default menu item with the highest priority.
|
IMenuObject |
getMenuObjectOfID(String sID)
Get the menu object with the specified ID
|
void |
iterateAllMenuObjects(com.helger.commons.callback.INonThrowingRunnableWithParameter<IMenuObject> aCallback)
Iterate all menu objects and invoke the supplied callback.
|
IMenuItemPage |
replaceMenuItem(IPage aNewPage)
Replace an eventually existing menu item with the new one.
|
void |
setDefaultMenuItemID(String sDefaultMenuItemID)
Set the default menu item.
|
void |
setDefaultMenuItemIDs(List<String> aDefaultMenuItemIDs)
Set the default menu items in the priority order.
|
void |
setDefaultMenuItemIDs(String... aDefaultMenuItemIDs)
Set the default menu items in the priority order.
|
@Nonnull IMenuSeparator createRootSeparator()
null.@Nonnull IMenuSeparator createSeparator(@Nonnull String sParentID)
sParentID - The parent menu item ID to append the separator to. May not be
null.null.IllegalArgumentException - If the passed parent menu item could not be resolved@Nonnull IMenuSeparator createSeparator(@Nonnull IMenuItem aParent)
aParent - The parent menu item to append the separator to. May not be
null.null.IllegalArgumentException - If the passed parent menu item could not be resolved@Nonnull IMenuItemPage createRootItem(@Nonnull String sItemID, @Nonnull IPage aPage)
sItemID - The new menu item ID. May not be null.aPage - The referenced page. May not be null.null.@Nonnull IMenuItemPage createRootItem(@Nonnull IPage aPage)
aPage - The referenced page. May not be null.null.@Nonnull IMenuItemPage createItem(@Nonnull String sParentID, @Nonnull String sItemID, @Nonnull IPage aPage)
sParentID - The parent menu item ID to append the item to. May not be
null.sItemID - The new menu item ID. May not be null.aPage - The referenced page. May not be null.null.IllegalArgumentException - If the passed parent menu item could not be resolved@Nonnull IMenuItemPage createItem(@Nonnull String sParentID, @Nonnull IPage aPage)
sParentID - The parent menu item ID to append the item to. May not be
null.aPage - The referenced page. May not be null.null.IllegalArgumentException - If the passed parent menu item could not be resolved@Nonnull IMenuItemPage createItem(@Nonnull IMenuItem aParent, @Nonnull IPage aPage)
aParent - The parent menu item to append the item to. May not be
null.aPage - The referenced page. May not be null.null.IllegalArgumentException - If the passed parent menu item could not be resolved@Nonnull IMenuItemExternal createRootItem(@Nonnull String sItemID, @Nonnull com.helger.commons.url.ISimpleURL aURL, @Nonnull com.helger.commons.name.IHasDisplayText aName)
sItemID - The new menu item ID. May not be null.aURL - The referenced URL. May not be null.aName - The name of the menu item. May not be null.null.@Nonnull IMenuItemExternal createItem(@Nonnull IMenuItem aParent, @Nonnull String sItemID, @Nonnull com.helger.commons.url.ISimpleURL aURL, @Nonnull com.helger.commons.name.IHasDisplayText aName)
aParent - The parent menu item to append the item to. May not be
null.sItemID - The new menu item ID. May not be null.aURL - The referenced URL. May not be null.aName - The name of the menu item. May not be null.null.IllegalArgumentException - If the passed parent menu item could not be resolved@Nonnull IMenuItemExternal createItem(@Nonnull String sParentID, @Nonnull String sItemID, @Nonnull com.helger.commons.url.ISimpleURL aURL, @Nonnull com.helger.commons.name.IHasDisplayText aName)
sParentID - The parent menu item ID to append the item to. May not be
null.sItemID - The new menu item ID. May not be null.aURL - The referenced URL. May not be null.aName - The name of the menu item. May not be null.null.IllegalArgumentException - If the passed parent menu item could not be resolvedvoid setDefaultMenuItemID(@Nullable String sDefaultMenuItemID)
setDefaultMenuItemIDs (new ArrayList (sDefaultMenuItemID));.
The passed menu item ID must resolve to an IMenuItemPage object.sDefaultMenuItemID - The default menu item to be set. May be null.void setDefaultMenuItemIDs(@Nullable String... aDefaultMenuItemIDs)
IMenuItemPage objects.aDefaultMenuItemIDs - The default menu items to be set. May be null. This
array may not contain any null entries.void setDefaultMenuItemIDs(@Nullable List<String> aDefaultMenuItemIDs)
IMenuItemPage objects.aDefaultMenuItemIDs - The default menu items to be set. May be null. This
list may not contain any null entries.@Nullable String getDefaultMenuItemID()
getAllDefaultMenuItemIDs().get(0).null.@Nonnull @ReturnsMutableCopy List<String> getAllDefaultMenuItemIDs()
null but may be
empty.@Nullable IMenuItemPage getDefaultMenuItem()
getAllDefaultMenuItems().get(0).null if either no default menu item is present, or the
default menu item ID could not be resolved to a menu item@Nonnull @ReturnsMutableCopy List<IMenuItemPage> getAllDefaultMenuItems()
setDefaultMenuItemIDs(List). Never null but
may be empty.@Nullable IMenuObject getMenuObjectOfID(@Nullable String sID)
sID - The ID to be resolved. May be null.null if the menu item could not be resolvedvoid iterateAllMenuObjects(@Nonnull com.helger.commons.callback.INonThrowingRunnableWithParameter<IMenuObject> aCallback)
aCallback - The callback to be supplied for each menu object. May not be
null.@Nullable IMenuItemPage replaceMenuItem(@Nonnull IPage aNewPage)
MenuItemPage object.aNewPage - The page to be used instead of the existing menu itemnull if no such menu item
exists.Copyright © 2014–2015 Philip Helger. All rights reserved.