com.googlecode.wicket.jquery.ui.widget.menu
Class AbstractMenuItem

java.lang.Object
  extended by com.googlecode.wicket.jquery.ui.widget.menu.AbstractMenuItem
All Implemented Interfaces:
IMenuItem, Serializable, org.apache.wicket.util.io.IClusterable
Direct Known Subclasses:
MenuItem

public abstract class AbstractMenuItem
extends Object
implements IMenuItem

Base class for Menu item

Since:
1.4.2, 6.2.2
Author:
Sebastien Briquet - sebfz1
See Also:
Serialized Form

Constructor Summary
AbstractMenuItem(org.apache.wicket.model.IModel<String> title, String icon)
          Constructor
 
Method Summary
 String getIcon()
          Gets the icon css class being displayed in the Menu
 String getId()
          Gets the menu-item markup id
 List<IMenuItem> getItems()
          Gets the List of submenu-items
 org.apache.wicket.model.IModel<String> getTitle()
          Gets the menu-item title
 boolean isEnabled()
          Indicates whether the menu-item is enabled
 void setEnabled(boolean enabled)
          Sets whether the menu-item is enabled
 void setIcon(String icon)
          Sets the icon css class being displayed in the Menu (ie: ui-my-icon)
 void setTitle(org.apache.wicket.model.IModel<String> title)
          Sets the menu-item title
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.googlecode.wicket.jquery.ui.widget.menu.IMenuItem
onClick
 

Constructor Detail

AbstractMenuItem

public AbstractMenuItem(org.apache.wicket.model.IModel<String> title,
                        String icon)
Constructor

Parameters:
title - IModel that represent the title of the menu-item
icon - the icon css class; 'ui-icon-blank' or JQueryIcon.BLANK may be used to not display any icon.
Method Detail

getId

public String getId()
Description copied from interface: IMenuItem
Gets the menu-item markup id

Specified by:
getId in interface IMenuItem
Returns:
the menu-item markup id

getTitle

public org.apache.wicket.model.IModel<String> getTitle()
Description copied from interface: IMenuItem
Gets the menu-item title

Specified by:
getTitle in interface IMenuItem
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

getIcon

public String getIcon()
Description copied from interface: IMenuItem
Gets the icon css class being displayed in the Menu

Specified by:
getIcon in interface IMenuItem
Returns:
the icon css class

setIcon

public void setIcon(String icon)
Sets the icon css class being displayed in the Menu (ie: ui-my-icon)

Parameters:
icon - the icon css class

isEnabled

public boolean isEnabled()
Description copied from interface: IMenuItem
Indicates whether the menu-item is enabled

Specified by:
isEnabled in interface IMenuItem
Returns:
true or false

setEnabled

public void setEnabled(boolean enabled)
Sets whether the menu-item is enabled

Parameters:
enabled - true or false

getItems

public List<IMenuItem> getItems()
Description copied from interface: IMenuItem
Gets the List of submenu-items

Specified by:
getItems in interface IMenuItem
Returns:
the List of submenu-items


Copyright © 2013 7thWeb. All Rights Reserved.