{YAHOO.util.CustomEvent} |
clickEvent
Fires when the user clicks the on a MenuModule instance.
|
String |
CSS_CLASS_NAME
Constant representing the CSS class(es) to be applied to the root
HTMLDivElement of the MenuModule instance.
|
String |
GROUP_TITLE_TAG_NAME
Constant representing the tagname of the HTMLElement used to title
a group of items.
|
YAHOO.widget.MenuModuleItem |
ITEM_TYPE
Constant representing the type of item to instantiate and add when parsing
the child nodes (either HTMLLIElement, HTMLOptGroupElement or
HTMLOptionElement) of a menu's DOM.
|
{YAHOO.util.CustomEvent} |
keyDownEvent
Fires when the user presses a key.
|
{YAHOO.util.CustomEvent} |
keyPressEvent
Fires when the user presses an alphanumeric key.
|
{YAHOO.util.CustomEvent} |
keyUpEvent
Fires when the user releases a key.
|
{YAHOO.util.CustomEvent} |
mouseDownEvent
Fires when the user mouses down on a MenuModule instance.
|
{YAHOO.util.CustomEvent} |
mouseOutEvent
Fires when the mouse has left a MenuModule instance.
|
{YAHOO.util.CustomEvent} |
mouseOverEvent
Fires when the mouse has entered a MenuModule instance.
|
{YAHOO.util.CustomEvent} |
mouseUpEvent
Fires when the user releases a mouse button while the mouse is over
a MenuModule instance.
|
{YAHOO.widget.MenuModuleItem} |
parent
Returns a MenuModule instance's parent object.
|
{HTMLSelectElement/HTMLDivElement} |
srcElement
Returns the HTMLElement (either HTMLSelectElement or HTMLDivElement)
used create the MenuModule instance.
|
Object |
superclass
|
Class YAHOO.widget.MenuModule
Object | +--YAHOO.widget.Overlay | +--YAHOO.widget.MenuModule
- Direct Known Subclasses:
- YAHOO.widget.Menu, YAHOO.widget.MenuBar
class
YAHOO.widget.MenuModule
Field Summary [top]
Method Summary [top]
YAHOO.widget.MenuModuleItem |
addItem
(<YAHOO.widget.MenuModuleItem> p_oItem, <Number> p_nGroupIndex)
Appends the specified item to a MenuModule instance.
|
void |
clearActiveItem
()
Sets the "selected" configuration property of a MenuModule instance's active
item to "false," blurs the item and hide's the item's submenu.
|
void |
configPosition
(<String> p_sType, <Array> p_aArguments, <YAHOO.widget.MenuModule> p_oMenuModule)
Event handler for when the "position" configuration property of a
MenuModule changes.
|
void |
destroy
()
Removes the MenuModule instance's element from the DOM and sets all child
elements to null.
|
void |
enforceConstraints
(type, args, obj)
The default event handler executed when the moveEvent is fired, if the
"constraintoviewport" configuration property is set to true.
|
YAHOO.widget.MenuModuleItem |
getItem
(<Number> p_nItemIndex, <Number> p_nGroupIndex)
Returns the item at the specified index.
|
Array |
getItemGroups
()
Returns a multi-dimensional array of all of a MenuModule's items.
|
void |
init
(<String Id or HTMLElement> p_oElement, <Object> p_oUserConfig)
The MenuModule class's initialization method.
|
void |
initDefaultConfig
()
Initializes the class's configurable properties which can be changed using
the MenuModule's Config object (cfg).
|
YAHOO.widget.MenuModuleItem |
insertItem
(<YAHOO.widget.MenuModuleItem> p_oItem, <Number> p_nItemIndex, <Number> p_nGroupIndex)
Inserts an item into a MenuModule instance at the specified index.
|
YAHOO.widget.MenuModuleItem |
removeItem
(<String or HTMLElement> p_oObject, <Number> p_nGroupIndex)
Removes the specified item from a MenuModule instance.
|
void |
setInitialFocus
()
Sets focus to a MenuModule instance's first enabled item.
|
void |
setInitialSelection
()
Sets the "selected" configuration property of a MenuModule instance's first
enabled item to "true."
|
void |
setItemGroupTitle
(<String> p_sGroupTitle, <Number> p_nGroupIndex)
Sets the title of a group of items.
|
Field Detail [top]
clickEvent
{YAHOO.util.CustomEvent}
clickEvent
Fires when the user clicks the on a MenuModule instance. Passes back the
DOM Event object as an argument.
CSS_CLASS_NAME
String
CSS_CLASS_NAME
Constant representing the CSS class(es) to be applied to the root
HTMLDivElement of the MenuModule instance.
GROUP_TITLE_TAG_NAME
String
GROUP_TITLE_TAG_NAME
Constant representing the tagname of the HTMLElement used to title
a group of items.
ITEM_TYPE
YAHOO.widget.MenuModuleItem
ITEM_TYPE
Constant representing the type of item to instantiate and add when parsing
the child nodes (either HTMLLIElement, HTMLOptGroupElement or
HTMLOptionElement) of a menu's DOM. The default
is YAHOO.widget.MenuModuleItem.
keyDownEvent
{YAHOO.util.CustomEvent}
keyDownEvent
Fires when the user presses a key. Passes back the DOM Event
object as an argument.
keyPressEvent
{YAHOO.util.CustomEvent}
keyPressEvent
Fires when the user presses an alphanumeric key. Passes back the
DOM Event object as an argument.
keyUpEvent
{YAHOO.util.CustomEvent}
keyUpEvent
Fires when the user releases a key. Passes back the DOM Event
object as an argument.
mouseDownEvent
{YAHOO.util.CustomEvent}
mouseDownEvent
Fires when the user mouses down on a MenuModule instance. Passes back the
DOM Event object as an argument.
mouseOutEvent
{YAHOO.util.CustomEvent}
mouseOutEvent
Fires when the mouse has left a MenuModule instance. Passes back the DOM
Event object as an argument.
mouseOverEvent
{YAHOO.util.CustomEvent}
mouseOverEvent
Fires when the mouse has entered a MenuModule instance. Passes back the
DOM Event object as an argument.
mouseUpEvent
{YAHOO.util.CustomEvent}
mouseUpEvent
Fires when the user releases a mouse button while the mouse is over
a MenuModule instance. Passes back the DOM Event object as an argument.
parent
{YAHOO.widget.MenuModuleItem}
parent
Returns a MenuModule instance's parent object.
srcElement
{HTMLSelectElement/HTMLDivElement}
srcElement
Returns the HTMLElement (either HTMLSelectElement or HTMLDivElement)
used create the MenuModule instance.
superclass
Object
superclass
Constructor Detail [top]
YAHOO.widget.MenuModule
YAHOO.widget.MenuModule
()
- Parameters:
-
p_oElement
- String id or HTMLElement (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node. -
p_oUserConfig
- Optional. The configuration object literal containing the configuration for a MenuModule instance. See configuration class documentation for more details.
Method Detail [top]
addItem
YAHOO.widget.MenuModuleItem
addItem
(<YAHOO.widget.MenuModuleItem> p_oItem, <Number> p_nGroupIndex)
Appends the specified item to a MenuModule instance.
- Parameters:
-
p_oItem
- The item to be added. -
p_nGroupIndex
- Optional. Number indicating the group to which the item belongs.
- Returns:
- The item that was added to the MenuModule.
clearActiveItem
void
clearActiveItem
()
Sets the "selected" configuration property of a MenuModule instance's active
item to "false," blurs the item and hide's the item's submenu.
configPosition
void
configPosition
(<String> p_sType, <Array> p_aArguments, <YAHOO.widget.MenuModule> p_oMenuModule)
Event handler for when the "position" configuration property of a
MenuModule changes.
- Parameters:
-
p_sType
- The name of the event that was fired. -
p_aArguments
- Collection of arguments sent when the event was fired. -
p_oMenuModule
- The MenuModule instance fired the event.
destroy
void
destroy
()
Removes the MenuModule instance's element from the DOM and sets all child
elements to null.
enforceConstraints
void
enforceConstraints
(type, args, obj)
The default event handler executed when the moveEvent is fired, if the
"constraintoviewport" configuration property is set to true.
getItem
YAHOO.widget.MenuModuleItem
getItem
(<Number> p_nItemIndex, <Number> p_nGroupIndex)
Returns the item at the specified index.
- Parameters:
-
p_nItemIndex
- Number indicating the ordinal position of the item to be retrieved. -
p_nGroupIndex
- Optional. Number indicating the group to which the item belongs.
- Returns:
- An item.
getItemGroups
Array
getItemGroups
()
Returns a multi-dimensional array of all of a MenuModule's items.
- Returns:
- An array of items.
init
void
init
(<String Id or HTMLElement> p_oElement, <Object> p_oUserConfig)
The MenuModule 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:
-
p_oUserConfig
- Optional. The configuration object literal containing the configuration for a MenuModule instance. See configuration class documentation for more details. -
p_oElement
- String id or HTMLElement (either HTMLSelectElement or HTMLDivElement) of the source HTMLElement node.
initDefaultConfig
void
initDefaultConfig
()
Initializes the class's configurable properties which can be changed using
the MenuModule's Config object (cfg).
insertItem
YAHOO.widget.MenuModuleItem
insertItem
(<YAHOO.widget.MenuModuleItem> p_oItem, <Number> p_nItemIndex, <Number> p_nGroupIndex)
Inserts an item into a MenuModule instance at the specified index.
- Parameters:
-
p_oItem
- The item to be inserted. -
p_nItemIndex
- Number indicating the ordinal position at which the item should be added. -
p_nGroupIndex
- Optional. Number indicating the group to which the item belongs.
- Returns:
- The item that was inserted into the MenuModule.
removeItem
YAHOO.widget.MenuModuleItem
removeItem
(<String or HTMLElement> p_oObject, <Number> p_nGroupIndex)
Removes the specified item from a MenuModule instance.
- Parameters:
-
p_nGroupIndex
- Optional. Number indicating the group to which the item belongs. -
YAHOO
- .widget.MenuModuleItem/Number} p_oObject The item or index of the item to be removed.
- Returns:
- The item that was removed from the MenuModule.
setInitialFocus
void
setInitialFocus
()
Sets focus to a MenuModule instance's first enabled item.
setInitialSelection
void
setInitialSelection
()
Sets the "selected" configuration property of a MenuModule instance's first
enabled item to "true."
setItemGroupTitle
void
setItemGroupTitle
(<String> p_sGroupTitle, <Number> p_nGroupIndex)
Sets the title of a group of items.
- Parameters:
-
p_sGroupTitle
- The title of the group. -
p_nGroupIndex
- Optional. Number indicating the group to which the title belongs.