JSMenu
Properties Summarized
Methods Summarized
Properties Detailed
name
The menu name (identifier)
Type String the name (identifier) of the menu
styleClass
Set/Get the menu space separated styleclases
Type String
Sample
Methods Detailed
addMenuItem(id)
Adds a new menu item, as last item in the list.
Parameters
String id the menu item identifier
Returns: JSMenuItem
Sample
addMenuItem(id, index)
Adds a new menu item, at a specific position.
Parameters
Returns: JSMenuItem
Sample
findMenuItem(id)
Gets a menu item by identifier. Also searches for nested elements. Returns null if not found.
Parameters
String id the menu item identifier
Returns: JSMenuItem
Sample
getMenuItem(id)
Gets a menu item by identifier. Returns null if not found.
Parameters
String id the menu item identifier
Returns: JSMenuItem
Sample
getMenuItemAt(index)
Gets a menu item by index (0 based). Returns null if not found.
Parameters
Number index the menu item index among its sibblings
Returns: JSMenuItem
Sample
getMenuItems()
Returns all the menus items, either created at design time or at runtime, in the order they will show up in user interface.
Returns: Array
Sample
getSelectedItem()
Returns: JSMenuItem the selectedItem
removeMenuItem(menuItem)
Removes a menu item from children's list, returns true if element was found an removed
Parameters
JSMenuItem menuItem the menu item to be removed
Returns: Boolean
Sample
removeMenuItem(id)
Removes a menu item with given id, returns true if element was found an removed
Parameters
String id the menu item identifier
Returns: Boolean
Sample
selectMenuItem(menuItem)
Selects a menu item in user interface
Parameters
JSMenuItem menuItem the menu item to be selected
Returns: void
Sample
Last updated