Class AbstractSfMenuItem
java.lang.Object
com.googlecode.wicket.jquery.ui.plugins.sfmenu.AbstractSfMenuItem
- All Implemented Interfaces:
ISfMenuItem,Serializable,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
SfMenuItem
Base class for
SfMenuItem item, adapted for Superfish- Since:
- 6.12.0
- Author:
- Ludger Kluitmann - JavaLuigi, Sebastien Briquet - sebfz1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSfMenuItem(org.apache.wicket.model.IModel<String> title) ConstructorAbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, Class<? extends org.apache.wicket.Page> pageClass) ConstructorAbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, Class<? extends org.apache.wicket.Page> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters pageParameters) ConstructorAbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, String pageUrl) ConstructorAbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, String pageUrl, boolean openInNewWindow) Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetItems()Gets theListof submenu-itemsClass<? extends org.apache.wicket.Page>Get the page class registered with the linkorg.apache.wicket.request.mapper.parameter.PageParametersGets the page parametersGet the url for a page.org.apache.wicket.model.IModel<String>getTitle()Gets the menu-item titlebooleanIndicates whether the menu-item is enabledbooleanIndicates whether the pages is opened in a new windowvoidsetEnabled(boolean enabled) Set whether the menu-item is enabledvoidsetOpenInNewWindow(boolean openInNewWindow) Set whether a page is opened in a new windowvoidSets the menu-item title
-
Constructor Details
-
AbstractSfMenuItem
Constructor- Parameters:
title-IModelthat represent the title of the menu-item
-
AbstractSfMenuItem
public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, Class<? extends org.apache.wicket.Page> pageClass) Constructor- Parameters:
title-IModelthat represent the title of the menu-itempageClass- the class of the page to redirect to when menu-item is clicked
-
AbstractSfMenuItem
public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, Class<? extends org.apache.wicket.Page> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters pageParameters) Constructor- Parameters:
title-IModelthat represent the title of the menu-itempageClass- the class of the page to redirect to when menu-item is clickedpageParameters- thePageParameters
-
AbstractSfMenuItem
Constructor- Parameters:
title-IModelthat represent the title of the menu-itempageUrl- the url of the page to redirect to when menu-item is clicked
-
AbstractSfMenuItem
public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, String pageUrl, boolean openInNewWindow) Constructor- Parameters:
title-IModelthat represent the title of the menu-itempageUrl- the url of the page to redirect to when menu-item is clickedopenInNewWindow- whether the page is opened in a new window
-
-
Method Details
-
getTitle
Description copied from interface:ISfMenuItemGets the menu-item title- Specified by:
getTitlein interfaceISfMenuItem- Returns:
- the menu-item title
-
setTitle
Sets the menu-item title- Parameters:
title- the menu-item title
-
getItems
Description copied from interface:ISfMenuItemGets theListof submenu-items- Specified by:
getItemsin interfaceISfMenuItem- Returns:
- the
Listof submenu-items
-
isEnabled
public boolean isEnabled()Description copied from interface:ISfMenuItemIndicates whether the menu-item is enabled- Specified by:
isEnabledin interfaceISfMenuItem- Returns:
- true or false
-
isOpenInNewWindow
public boolean isOpenInNewWindow()Description copied from interface:ISfMenuItemIndicates whether the pages is opened in a new window- Specified by:
isOpenInNewWindowin interfaceISfMenuItem- Returns:
- true or false
-
setEnabled
public void setEnabled(boolean enabled) Set whether the menu-item is enabled- Parameters:
enabled-trueorfalse
-
setOpenInNewWindow
public void setOpenInNewWindow(boolean openInNewWindow) Set whether a page is opened in a new window- Parameters:
openInNewWindow-trueorfalse
-
getPageClass
Get the page class registered with the link- Specified by:
getPageClassin interfaceISfMenuItem- Returns:
- the page class
-
getPageParameters
public org.apache.wicket.request.mapper.parameter.PageParameters getPageParameters()Description copied from interface:ISfMenuItemGets the page parameters- Specified by:
getPageParametersin interfaceISfMenuItem- Returns:
- the
PageParameters
-
getPageUrl
Get the url for a page. In most cases this will be an url for an external page.- Specified by:
getPageUrlin interfaceISfMenuItem- Returns:
- url of the page
-