Jx.Menu.Item

Extends: Jx.Button

A menu item is a single entry in a menu.  It is typically composed of a label and an optional icon.  Selecting the menu item emits an event.

Jx.Menu.Item is represented by a Jx.Button with type MenuItem and the associated CSS changes noted in Jx.Button.  The container of a MenuItem is an ‘li’ element.

Example

Events

clickfired when the menu item is clicked.

License

Copyright © 2008, DM Solutions Group Inc.

This file is licensed under an MIT style license

Summary
Jx.Menu.ItemExtends: Jx.Button
Properties
owner{<Jx.SubMenu> or Jx.Menu} the menu that contains the menu item.
Constructor
Jx.Menu.ItemCreate a new instance of Jx.Menu.Item
Functions
setOwnerSet the owner of this menu item
hideHide the menu item.
showShow the menu item
clickedHandle the user clicking on the menu item, overriding the Jx.Button::clicked method to facilitate menu tracking
onmouseoverhandle the mouse moving over the menu item

Properties

owner

{<Jx.SubMenu> or Jx.Menu} the menu that contains the menu item.

Constructor

Jx.Menu.Item

Create a new instance of Jx.Menu.Item

Parameters

optionsSee Jx.Button.Options

Functions

setOwner

setOwner: function(obj)

Set the owner of this menu item

Parameters

obj{Object} the new owner

hide

hide: function()

Hide the menu item.

show

Show the menu item

clicked

clicked: function(obj)

Handle the user clicking on the menu item, overriding the Jx.Button::clicked method to facilitate menu tracking

Parameters

obj{Object} an object containing an event property that was the user event.

onmouseover

handle the mouse moving over the menu item

Parameters

e{Event} the mousemove event
Extends: Object
Extends: Object
setOwner: function(obj)
Set the owner of this menu item
hide: function()
Hide the menu item.
clicked: function(obj)
Handle the user clicking on the menu item, overriding the Jx.Button::clicked method to facilitate menu tracking
clicked : function(evt)
triggered when the user clicks the button, processes the actionPerformed event