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
public abstract class AbstractSfMenuItem extends Object implements ISfMenuItem
Base class forSfMenuItem
item, adapted for Superfish- Since:
- 6.12.0
- Author:
- Ludger Kluitmann - JavaLuigi, Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractSfMenuItem(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ISfMenuItem>
getItems()
Gets theList
of submenu-itemsClass<? extends org.apache.wicket.Page>
getPageClass()
Get the page class registered with the linkorg.apache.wicket.request.mapper.parameter.PageParameters
getPageParameters()
Gets the page parametersString
getPageUrl()
Get the url for a page.org.apache.wicket.model.IModel<String>
getTitle()
Gets the menu-item titleboolean
isEnabled()
Indicates whether the menu-item is enabledboolean
isOpenInNewWindow()
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
setTitle(org.apache.wicket.model.IModel<String> title)
Sets the menu-item title
-
-
-
Constructor Detail
-
AbstractSfMenuItem
public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title)
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
public AbstractSfMenuItem(org.apache.wicket.model.IModel<String> title, String pageUrl)
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 Detail
-
getTitle
public org.apache.wicket.model.IModel<String> getTitle()
Description copied from interface:ISfMenuItem
Gets the menu-item title- Specified by:
getTitle
in interfaceISfMenuItem
- Returns:
- the menu-item title
-
setTitle
public void setTitle(org.apache.wicket.model.IModel<String> title)
Sets the menu-item title- Parameters:
title
- the menu-item title
-
getItems
public List<ISfMenuItem> 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
public Class<? extends org.apache.wicket.Page> 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
public String 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
-
-