{ "type": "class", | |
"qname": "org.apache.royale.html.Menu", | |
"baseClassname": "org.apache.royale.html.List" | |
, | |
"description": "The Menu class builds pop-up menus that are presented as a list, displayed at a specific location. The dataProvider should be an Array of either Strings or Objects; if Objects, set the Menu's labelField to identify the property in the Object to use for the labels in the Menu. Use createMenu to create a Menu and add an event listener to be triggered when a menu item is selected. var menu:Menu = Menu.createMenu(dataProvider); menu.addEventListener("change", handleSelection); Present the menu using the show function: menu.show(component, xoffset, yoffset); Pass a component to use a reference when calculating the position of the menu. Set an offset from the component's upper-left corner. If an item is selected the event listener will be called. Remove the menu using menu.hide(); Note: submenus are not supported.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 10.2", "AIR 2.6"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "org.apache.royale.html.Menu", | |
"namespace": "", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Constructor.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 10.2", "AIR 2.6"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "", | |
"params": []} | |
, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "submenuField", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The submenuField is not used by Menu (see CascadingMenu).", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 10.2", "AIR 2.6"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "org.apache.royale.events.IEventDispatcher", | |
"qname": "parentMenuBar", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}}, | |
{ "type": "method", | |
"qname": "createMenu", | |
"namespace": "public", | |
"bindable": [], | |
"details": ["static"], | |
"deprecated": {}, | |
"description": "Creates a new instance of the menu, attaching the data given as the dataProvider to the menu.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["dataProvider Object Either an Array of Strings or an Array of Objects."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 10.2", "AIR 2.6"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9"]}, | |
{ "tagName": "return", | |
"values": ["Menu The Menu created."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "org.apache.royale.html.Menu", | |
"params": [{ "name": "dataProvider", "type": "Object"}]} | |
, | |
{ "type": "method", | |
"qname": "show", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Displays the menu at the given location which is an offset from the origin of the component supplied.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["component IUIBase A reference position used to place the Menu.", "xoffset Number The horizontal offset from the component's position.", "yoffset Number The vertical offset from the component's position."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 10.2", "AIR 2.6"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "void", | |
"params": [{ "name": "component", "type": "org.apache.royale.core.IUIBase"}, | |
{ "name": "xoffset", "type": "Number"}, | |
{ "name": "yoffset", "type": "Number"}]} | |
, | |
{ "type": "method", | |
"qname": "hide", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Hides the menu if displayed.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 10.2", "AIR 2.6"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "void", | |
"params": []} | |
] | |
} |