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 theList
of submenu-itemsClass<? extends org.apache.wicket.Page>
Get the page class registered with the linkorg.apache.wicket.request.mapper.parameter.PageParameters
Gets the page parametersGet the url for a page.org.apache.wicket.model.IModel<String>
getTitle()
Gets the menu-item titleboolean
Indicates whether the menu-item is enabledboolean
Indicates whether the pages is opened in a new windowvoid
setEnabled
(boolean enabled) Set whether the menu-item is enabledvoid
setOpenInNewWindow
(boolean openInNewWindow) Set whether a page is opened in a new windowvoid
Sets the menu-item title
-
Constructor Details
-
AbstractSfMenuItem
Constructor- Parameters:
title
-IModel
that 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
-IModel
that 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
-IModel
that 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
-IModel
that 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
-IModel
that 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:ISfMenuItem
Gets the menu-item title- Specified by:
getTitle
in interfaceISfMenuItem
- Returns:
- the menu-item title
-
setTitle
Sets the menu-item title- Parameters:
title
- the menu-item title
-
getItems
Description copied from interface:ISfMenuItem
Gets theList
of submenu-items- Specified by:
getItems
in interfaceISfMenuItem
- Returns:
- the
List
of submenu-items
-
isEnabled
public boolean isEnabled()Description copied from interface:ISfMenuItem
Indicates whether the menu-item is enabled- Specified by:
isEnabled
in interfaceISfMenuItem
- Returns:
- true or false
-
isOpenInNewWindow
public boolean isOpenInNewWindow()Description copied from interface:ISfMenuItem
Indicates whether the pages is opened in a new window- Specified by:
isOpenInNewWindow
in interfaceISfMenuItem
- Returns:
- true or false
-
setEnabled
public void setEnabled(boolean enabled) Set whether the menu-item is enabled- Parameters:
enabled
-true
orfalse
-
setOpenInNewWindow
public void setOpenInNewWindow(boolean openInNewWindow) Set whether a page is opened in a new window- Parameters:
openInNewWindow
-true
orfalse
-
getPageClass
Get the page class registered with the link- Specified by:
getPageClass
in interfaceISfMenuItem
- Returns:
- the page class
-
getPageParameters
public org.apache.wicket.request.mapper.parameter.PageParameters getPageParameters()Description copied from interface:ISfMenuItem
Gets the page parameters- Specified by:
getPageParameters
in 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:
getPageUrl
in interfaceISfMenuItem
- Returns:
- url of the page
-