| PREV CLASS Documentation homepage NEXT CLASS |
IlvObject
|
+--IlvPanel
|
+--IlvMenuItem
IlvMenuItem with the specified label,isEnabled,action and image properties.
properties. Note that the use of "-" in a label is reserved to indicate a
separator between menu items. By default, all menu items are enabled, except
separators.
IlvMenu| Constructor Summary | |
|---|---|
IlvMenuItem(label, isEnabled, action, image, path)
|
|
| Method Summary | |
|---|---|
createHTMLContent(width, height)
Generates the HTML representation of this menu item. |
|
getAction()
Returns the action to trigger when this menu item is selected. |
|
getIcon()
Retrieves the icon of this menu item. |
|
getIconPreferredSize()
Returns the preferred size used by the icon of this menu item. |
|
getLabel()
Retrieves the label of this menu item. |
|
getParent()
Returns the parent of this menu item. |
|
getPreferredSize()
Returns the preferred size for this menu item. |
|
getRoot()
Returns the root IlvMenu instance for this menu item. |
|
isEnabled()
Checks whether this menu item is enabled. |
|
isHighlighted()
Checks whether this menu item is highlighted. |
|
isRoot()
Returns true if this menu is of type IlvMenu and a root menu. |
|
onmouseover()
Invoked each time the user moves the mouse over this menu item. |
|
onmouseup()
Invoked each time the user clicks this menu item. |
|
performServerAction(actionName, params, updateAll)
Performs a server action, using the action name and the parameters. |
|
recycle()
Prepares this menu item to be recycled. |
|
setAction(action)
Sets the action to trigger when this menu item is selected. |
|
setEnabled(isEnabled)
Specifies whether this menu item can be chosen. |
|
setHighlighted(isHighlighted)
Specifies whether this menu item is highlighted. |
|
setIcon(image)
Sets the icon for this menu item to the specified image URL. |
|
setLabel(label)
Sets the label for this menu item to the specified label. |
|
setLocation(left, top)
Sets the location of this menu item. |
|
setPreferredSize(width, height)
Sets the preferred size of this menu item. |
|
setSize(width, height)
Sets the size of this menu item. |
|
setVisible(isVisible)
Specifies whether this menu item is visible or not. |
|
update()
Updates the content of the menu item. |
|
| Constructor Detail |
IlvMenuItem(label, isEnabled, action, image, path)
| Method Detail |
createHTMLContent(width, height)
This method is invoked without any parameters by the getPreferredSize method
to compute the best size for this menu item.
getAction()
getIcon()
getIconPreferredSize()
getLabel()
getParent()
IlvMenu. An instance of IlvMenuItem has
always a parent. However, the root instance of IlvMenu
returns null.
#isRoot#getRootgetPreferredSize()
getRoot()
IlvMenu instance for this menu item.
#getParent#isRootisEnabled()
true if the menu item is enabled; false if it is disabled.isHighlighted()
true if the menu item is highlighted; otherwise, returns false.isRoot()
true if this menu is of type IlvMenu and a root menu.
If this menu is of type IlvMenuItem, or an IlvMenu that
is a submenu, this method returns false.
#getParent#getRootonmouseover()
onmouseup()
This method sends the action corresponding to this menu item to the server and refreshes the view. It can be modified/overridden to handle the action locally or in a different way.
performServerAction(actionName, params, updateAll)
performServerAction of the popup menu
attached to the root menu of this menu item. actionName - The server action nameparams - The additional action parameters.updateAll - Flag to determine whether update the image only or also the capabilities
(if the view is compatible).recycle()
setAction(action)
Sets the action to trigger when this menu item is selected.
The action can either be a String or a function.
In the function signature has two parameters:
view The view on which this popup menu is displayeditem The menu item that was selected.action - The action to set.setEnabled(isEnabled)
isEnabled - If true, the menu item is enabled; if false, the menu item is disabled.setHighlighted(isHighlighted)
isHighlighted - If true, this menu item is highlighted.setIcon(image)
image - The new icon, or null for no icon.setLabel(label)
label - The new label, or null for no label.setLocation(left, top)
left - The y coordinate of the top-left corner of the menu item.top - The x coordinate of the top-left corner of the menu item.setPreferredSize(width, height)
setSize(width, height)
width - The new width of this menu item.height - The new height of this menu item.setVisible(isVisible)
update()
| Inherited Methods from IlvPanel |
| Inherited Methods from IlvObject |
| PREV CLASS Documentation homepage NEXT CLASS |