public class MenuItem extends AbstractMenuItem
Constructor and Description |
---|
MenuItem(org.apache.wicket.model.IModel<String> title)
Constructor
|
MenuItem(org.apache.wicket.model.IModel<String> title,
List<IMenuItem> items)
Constructor
|
MenuItem(org.apache.wicket.model.IModel<String> title,
String icon)
Constructor
|
MenuItem(org.apache.wicket.model.IModel<String> title,
String icon,
List<IMenuItem> items)
Constructor
|
MenuItem(String title)
Constructor
|
MenuItem(String title,
List<IMenuItem> items)
Constructor
|
MenuItem(String title,
String icon)
Constructor
|
MenuItem(String title,
String icon,
List<IMenuItem> items)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
addItem(IMenuItem item)
Adds an menu-item as child of this menu-item
|
List<IMenuItem> |
getItems()
Gets the
List of submenu-items |
void |
onClick(org.apache.wicket.ajax.AjaxRequestTarget target)
Triggered when the menu-item is clicked
|
getIcon, getId, getTitle, isEnabled, setEnabled, setIcon, setTitle
public MenuItem(String title)
title
- the title of the menu-itempublic MenuItem(String title, String icon)
title
- the title of the menu-itemicon
- the icon css class (ie: ui-my-icon)public MenuItem(org.apache.wicket.model.IModel<String> title)
title
- IModel that represent the title of the menu-itempublic MenuItem(org.apache.wicket.model.IModel<String> title, String icon)
title
- IModel that represent the title of the menu-itemicon
- the icon css class (ie: ui-my-icon)public MenuItem(String title, List<IMenuItem> items)
title
- the title of the menu-itemitems
- the sub-menu itemspublic MenuItem(String title, String icon, List<IMenuItem> items)
title
- the title of the menu-itemicon
- the icon css class (ie: ui-my-icon)items
- the sub-menu itemspublic MenuItem(org.apache.wicket.model.IModel<String> title, List<IMenuItem> items)
title
- IModel that represent the title of the menu-itemitems
- the sub-menu itemspublic List<IMenuItem> getItems()
IMenuItem
List
of submenu-itemsgetItems
in interface IMenuItem
getItems
in class AbstractMenuItem
List
of submenu-itemspublic boolean addItem(IMenuItem item)
item
- the IMenuItem
Collection.add(Object)
)public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target)
IMenuItem
target
- the AjaxRequestTarget
Copyright © 2016 7thWeb. All rights reserved.