Class YAHOO.widget.MenuItem

Object
   |
   +--YAHOO.widget.MenuModuleItem
         |
         +--YAHOO.widget.MenuItem
Direct Known Subclasses:
YAHOO.widget.ContextMenuItem

class YAHOO.widget.MenuItem

Field Summary [top]

String CHECKED_IMAGE_ALT_TEXT
Constant representing the alt text for the image to be used for the checked image. 
String CHECKED_IMAGE_PATH
Constant representing the path to the image to be used for the checked state. 
String DISABLED_CHECKED_IMAGE_ALT_TEXT
Constant representing the alt text for the image to be used for the checked image when the item is disabled. 
String DISABLED_CHECKED_IMAGE_PATH
Constant representing the path to the image to be used for the disabled checked state. 
String SELECTED_CHECKED_IMAGE_PATH
Constant representing the path to the image to be used for the selected checked state. 

Method Summary [top]

void configChecked (<String> p_sType, <Array> p_aArgs, <YAHOO.widget.MenuItem> p_oItem)
Event handler for when the "checked" configuration property of a MenuItem instance changes. 
void configDisabled (<String> p_sType, <Array> p_aArgs, <YAHOO.widget.MenuItem> p_oItem)
Event handler for when the "disabled" configuration property of a MenuItem instance changes. 
void configSelected (<String> p_sType, <Array> p_aArgs, <YAHOO.widget.MenuItem> p_oItem)
Event handler for when the "selected" configuration property of a MenuItem instance changes. 
void init (<String Id or HTMLElement> p_oObject, <Object> p_oConfig)
The MenuItem class's initialization method. 
void initDefaultConfig ()
Initializes the class's configurable properties which can be changed using the MenuModule's Config object (cfg). 

Field Detail [top]

CHECKED_IMAGE_ALT_TEXT

String   CHECKED_IMAGE_ALT_TEXT
Constant representing the alt text for the image to be used for the checked image.

CHECKED_IMAGE_PATH

String   CHECKED_IMAGE_PATH
Constant representing the path to the image to be used for the checked state.

DISABLED_CHECKED_IMAGE_ALT_TEXT

String   DISABLED_CHECKED_IMAGE_ALT_TEXT
Constant representing the alt text for the image to be used for the checked image when the item is disabled.

DISABLED_CHECKED_IMAGE_PATH

String   DISABLED_CHECKED_IMAGE_PATH
Constant representing the path to the image to be used for the disabled checked state.

SELECTED_CHECKED_IMAGE_PATH

String   SELECTED_CHECKED_IMAGE_PATH
Constant representing the path to the image to be used for the selected checked state.

Constructor Detail [top]

YAHOO.widget.MenuItem

YAHOO.widget.MenuItem ()
Parameters:
{String or HTMLElement} p_oObject - String or HTMLElement (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the source HTMLElement node.
p_oConfig - The configuration object literal containing the configuration for a MenuItem instance. See the configuration class documentation for more details.

Method Detail [top]

configChecked

void configChecked (<String> p_sType, <Array> p_aArgs, <YAHOO.widget.MenuItem> p_oItem)
Event handler for when the "checked" configuration property of a MenuItem instance changes.
Parameters:
p_sType - The name of the event that was fired.
p_aArgs - Collection of arguments sent when the event was fired.
p_oItem - The MenuItem instance that fired the event.

configDisabled

void configDisabled (<String> p_sType, <Array> p_aArgs, <YAHOO.widget.MenuItem> p_oItem)
Event handler for when the "disabled" configuration property of a MenuItem instance changes.
Parameters:
p_sType - The name of the event that was fired.
p_aArgs - Collection of arguments sent when the event was fired.
p_oItem - The MenuItem instance that fired the event.

configSelected

void configSelected (<String> p_sType, <Array> p_aArgs, <YAHOO.widget.MenuItem> p_oItem)
Event handler for when the "selected" configuration property of a MenuItem instance changes.
Parameters:
p_sType - The name of the event that was fired.
p_aArgs - Collection of arguments sent when the event was fired.
p_oItem - The MenuItem instance that fired the event.

init

void init (<String Id or HTMLElement> p_oObject, <Object> p_oConfig)
The MenuItem class's initialization method. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
Parameters:
{String or HTMLElement} p_oObject - String or HTMLElement (either HTMLLIElement, HTMLOptGroupElement or HTMLOptionElement) of the source HTMLElement node.
p_oConfig - The configuration object literal containing the configuration for a MenuItem instance. See the configuration class documentation for more details.

initDefaultConfig

void initDefaultConfig ()
Initializes the class's configurable properties which can be changed using the MenuModule's Config object (cfg).