public class MenuItem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_ICON
Default icon of a Menu Item.
|
static int |
DEFAULT_ORDER
Default order of a Menu Item.
|
protected boolean |
enabled |
protected java.lang.String |
icon |
protected java.lang.String |
id |
protected java.lang.String |
jspPath |
protected int |
order |
Constructor and Description |
---|
MenuItem(MenuItem other)
Constructor by copy
|
MenuItem(java.lang.String id,
java.lang.String jspPath,
java.lang.String icon,
int order)
Builds a new Menu Item from the specified parameter
|
Modifier and Type | Method and Description |
---|---|
void |
disable()
Disable this item.
|
void |
enable()
Enable this item.
|
java.lang.String |
getIcon()
Returns the icon of this this item.
|
java.lang.String |
getId()
Returns the unique ID od this item.
|
java.lang.String |
getJspPath()
Returns the path of the JSP for this item.
|
java.lang.String |
getLabel(java.lang.String lang)
Retrieve the label of this Menu item in the specified language
|
int |
getOrder()
Returns the order of this item when compared to other MenuItem instance.
|
boolean |
isEnabled()
Check if this item is enabled or not.
|
void |
setEnabled(boolean enabled)
Set the enabled status of this item.
|
void |
setIcon(java.lang.String icon)
Sets the icon this item.
|
void |
setId(java.lang.String id)
Sets the id of this item
|
void |
setJspPath(java.lang.String jspPath)
Sets the path of JSP.
|
void |
setOrder(int order)
Sets the order of this item when compared to others
|
java.lang.String |
toString() |
public static final java.lang.String DEFAULT_ICON
public static final int DEFAULT_ORDER
protected java.lang.String id
protected java.lang.String jspPath
protected java.lang.String icon
protected int order
protected boolean enabled
public MenuItem(MenuItem other)
other
- a MenuItem to copypublic MenuItem(java.lang.String id, java.lang.String jspPath, java.lang.String icon, int order)
id
- a unique id for this item.jspPath
- the path of the JSP for this item.icon
- the icon of this itemorder
- the order of this itempublic java.lang.String getLabel(java.lang.String lang)
lang
- an ISO-639 language codepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getId()
public void setId(java.lang.String id)
id
- a unique idpublic java.lang.String getJspPath()
public void setJspPath(java.lang.String jspPath)
jspPath
- a path (relative to webapp root)public java.lang.String getIcon()
public void setIcon(java.lang.String icon)
icon
- the jalios icon id setpublic int getOrder()
public void setOrder(int order)
order
- the order to setpublic boolean isEnabled()
public void enable()
public void disable()
public void setEnabled(boolean enabled)
enabled
- true if enabled, false if disabledCopyright © 2001-2017 Jalios SA. All Rights Reserved.