Class MenuItem
- java.lang.Object
-
- com.googlecode.wicket.jquery.ui.widget.menu.AbstractMenuItem
-
- com.googlecode.wicket.jquery.ui.widget.menu.MenuItem
-
- All Implemented Interfaces:
IMenuItem
,Serializable
,org.apache.wicket.util.io.IClusterable
public class MenuItem extends AbstractMenuItem
Provides a standard menu-item that supports sub-menus- Since:
- 1.4.2, 6.2.2
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MenuItem(String title)
ConstructorMenuItem(String title, String icon)
ConstructorMenuItem(String title, String icon, List<IMenuItem> items)
ConstructorMenuItem(String title, List<IMenuItem> items)
ConstructorMenuItem(org.apache.wicket.model.IModel<String> title)
ConstructorMenuItem(org.apache.wicket.model.IModel<String> title, String icon)
ConstructorMenuItem(org.apache.wicket.model.IModel<String> title, String icon, List<IMenuItem> items)
ConstructorMenuItem(org.apache.wicket.model.IModel<String> title, List<IMenuItem> items)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addItem(IMenuItem item)
Adds a menu-item as child of this menu-itemList<IMenuItem>
getItems()
Gets theList
of submenu-itemsvoid
onClick(org.apache.wicket.ajax.AjaxRequestTarget target)
Triggered when the menu-item is clicked-
Methods inherited from class com.googlecode.wicket.jquery.ui.widget.menu.AbstractMenuItem
getIcon, getId, getTitle, isEnabled, setEnabled, setIcon, setTitle
-
-
-
-
Constructor Detail
-
MenuItem
public MenuItem(String title)
Constructor- Parameters:
title
- the title of the menu-item
-
MenuItem
public MenuItem(String title, String icon)
Constructor- Parameters:
title
- the title of the menu-itemicon
- the icon css class (ie: ui-my-icon)
-
MenuItem
public MenuItem(org.apache.wicket.model.IModel<String> title)
Constructor- Parameters:
title
- IModel that represent the title of the menu-item
-
MenuItem
public MenuItem(org.apache.wicket.model.IModel<String> title, String icon)
Constructor- Parameters:
title
- IModel that represent the title of the menu-itemicon
- the icon css class (ie: ui-my-icon)
-
MenuItem
public MenuItem(String title, List<IMenuItem> items)
Constructor- Parameters:
title
- the title of the menu-itemitems
- the sub-menu items
-
MenuItem
public MenuItem(String title, String icon, List<IMenuItem> items)
Constructor- Parameters:
title
- the title of the menu-itemicon
- the icon css class (ie: ui-my-icon)items
- the sub-menu items
-
MenuItem
public MenuItem(org.apache.wicket.model.IModel<String> title, List<IMenuItem> items)
Constructor- Parameters:
title
- IModel that represent the title of the menu-itemitems
- the sub-menu items
-
-
Method Detail
-
getItems
public List<IMenuItem> getItems()
Description copied from interface:IMenuItem
Gets theList
of submenu-items- Specified by:
getItems
in interfaceIMenuItem
- Overrides:
getItems
in classAbstractMenuItem
- Returns:
- the
List
of submenu-items
-
addItem
public boolean addItem(IMenuItem item)
Adds a menu-item as child of this menu-item- Parameters:
item
- theIMenuItem
- Returns:
- true (as specified by
Collection.add(Object)
)
-
onClick
public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target)
Description copied from interface:IMenuItem
Triggered when the menu-item is clicked- Parameters:
target
- theAjaxRequestTarget
-
-