{ "type": "class", | |
"qname": "mx.controls.MenuBar", | |
"baseClassname": "mx.core.UIComponent" | |
, | |
"description": "A MenuBar control defines a horizontal, top-level menu bar that contains one or more menus. Clicking on a top-level menu item opens a pop-up submenu that is an instance of the Menu control. <p>The top-level menu bar of the MenuBar control is generally always visible. It is not intended for use as a pop-up menu. The individual submenus pop up as the user selects them with the mouse or keyboard. Open submenus disappear when a menu item is selected, or if the menu is dismissed by the user clicking outside the menu.</p> <p>For information and an example on the attributes that you can use in the data provider for the MenuBar control, see the Menu control.</p> <p>The MenuBar control has the following sizing characteristics: </p> <table class="innertable"> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>The width is determined from the menu text, with a minimum value of 27 pixels for the width. The default value for the height is 22 pixels.</td> </tr> </table> <p> The <code><mx:MenuBar></code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes: </p> <pre>\\n <mx:MenuBar\\n <b>Properties</b>\\n dataDescriptor="<i>mx.controls.treeClasses.DefaultDataDescriptor</i>"\\n dataProvider="<i>undefined</i>"\\n iconField="icon"\\n labelField="label"\\n labelFunction="<i>undefined</i>"\\n menuBarItemRenderer="<i>mx.controls.menuClasses.MenuBarItem</i>"\\n menuBarItems="[]"\\n menus="[]"\\n selectedIndex="-1"\\n showRoot="true"\\n \\n <b>Styles</b>\\n backgroundSkin="mx.skins.halo.MenuBarBackgroundSkin"\\n borderColor="0xAAB3B3"\\n color="0x0B333C"\\n cornerRadius="0"\\n disabledColor="0xAAB3B3"\\n fillAlphas="[0.6,0.4]"\\n fillColors="[0xFFFFFF, 0xCCCCCC]"\\n focusAlpha="0.5"\\n focusRoundedCorners="tl tr bl br"\\n fontAntiAliasType="advanced|normal"\\n fontFamily="Verdana"\\n fontGridFitType="pixel|none|subpixel"\\n fontSharpness="0"\\n fontSize="10"\\n fontStyle="normal|italic"\\n fontThickness="0"\\n fontWeight="normal|bold"\\n highlightAlphas="[0.3,0.0]"\\n itemDownSkin="mx.skins.halo.ActivatorSkin"\\n itemOverSkin="mx.skins.halo.ActivatorSkin"\\n itemUpSkin="mx.skins.halo.ActivatorSkin"\\n leading="2"\\n menuStyleName="<i>No default</i>"\\n rollOverColor="0xB2E1FF"\\n selectionColor="0x7FCEFF"\\n textAlign="left"\\n textDecoration="none"\\n textIndent="0"\\n \\n <b>Events</b>\\n itemClick="<i>No default"</i>\\n itemRollOut="<i>No default"</i>\\n itemRollOver="<i>No default"</i>\\n menuHide="<i>No default"</i>\\n menuShow="<i>No default"</i>\\n />\\n </pre> </p>", | |
"tags": [ | |
{ "tagName": "includeExample", | |
"values": ["examples/MenuBarExample.mxml"]}, | |
{ "tagName": "see", | |
"values": ["mx.controls.Menu", "mx.controls.PopUpMenuButton", "mx.controls.menuClasses.IMenuBarItemRenderer", "mx.controls.menuClasses.MenuBarItem", "mx.controls.menuClasses.IMenuDataDescriptor", "mx.controls.treeClasses.DefaultDataDescriptor"]}, | |
{ "tagName": "royalesuppresspublicvarwarning", | |
"values": []}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "mxml", | |
"values": []}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "mx.controls.MenuBar", | |
"namespace": "", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Constructor.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "", | |
"params": []} | |
, | |
{ "type": "accessor", | |
"access": "read-only", | |
"return": "org.apache.royale.core.IParent", | |
"qname": "strandChildren", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 10.2", "AIR 2.6"]}, | |
{ "tagName": "copy", | |
"values": ["org.apache.royale.core.IContentViewHost#strandChildren"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.8"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Object", | |
"qname": "dataProvider", | |
"namespace": "public", | |
"bindable": ["collectionChange"], | |
"details": [], | |
"deprecated": {}, | |
"description": "The hierarchy of objects that are displayed as MenuBar items and menus. The top-level children all become MenuBar items, and their children become the items in the menus and submenus. The MenuBar control handles the source data object as follows: <p> <ul> <li>A String containing valid XML text is converted to an XML object.</li> <li>An XMLNode is converted to an XML object.</li> <li>An XMLList is converted to an XMLListCollection.</li> <li>Any object that implements the ICollectionView interface is cast to an ICollectionView.</li> <li>An Array is converted to an ArrayCollection.</li> <li>Any other type object is wrapped in an Array with the object as its sole entry.</li> </ul> </p>", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""undefined""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "iconField", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The name of the field in the data provider that determines the icon to display for each menu item. By default, the MenuBar does not try to display icons along with the text in a menu item. By specifying an icon field, you can define a graphic that is created and displayed as an icon for a menu item. <p>The MenuItemRenderer examines the data provider for a property of the name defined by the <code>iconField</code> property. If the value of the property is a Class, it instantiates that class and expects it to be an instance of IFlexDisplayObject. If the value of the property is a String, it looks to see if a Class exists with that name in the application, and if it cannot find one, it looks for a property on the document with that name and expects that property to map to a Class.</p>", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""icon""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "labelField", | |
"namespace": "public", | |
"bindable": ["labelFieldChanged"], | |
"details": [], | |
"deprecated": {}, | |
"description": "The name of the field in the data provider that determines the text to display for each menu item. If the data provider is an Array of Strings, Flex uses each string value as the label. If the data provider is an E4X XML object, you must set this property explicitly. as the text to display for each menu item. Setting the <code>labelFunction</code> property overrides this property.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": [""label""]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "label", | |
"values": ["to specify the label attribute in an E4X XML Object"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-only", | |
"return": "Array", | |
"qname": "menuBarItems", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "An Array that contains the MenuBarItem objects that render each item in the top-level menu bar of a MenuBar control. By default, this property contains instances of the MenuBarItem class. Items should not be added directly to the <code>menuBarItems</code> array. To add new menubar items, add them directly to the MenuBar control's data provider.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["[ ]"]}, | |
{ "tagName": "see", | |
"values": ["mx.controls.menuClasses.MenuBarItem"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "field", | |
"qname": "menus", | |
"return": "Array", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "An Array containing the Menu objects corresponding to the pop-up submenus of this MenuBar control. Each MenuBar item can have a corresponding Menu object in the Array, even if the item does not have a pop-up submenu. Flex does not initially populate the <code>menus</code> array; instead, it creates the menus dynamically, as needed. Items should not be added directly to the <code>menus</code> Array. To add new drop-down menus, add directly to the MenuBar control's data provider.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["[ ]"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "int", | |
"qname": "selectedIndex", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The index in the MenuBar control of the currently open Menu or the last opened Menu if none are currently open.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["-1"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Boolean", | |
"qname": "showRoot", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "A Boolean flag that specifies whether to display the data provider's root node. If the data provider has a root node, and the <code>showRoot</code> property is set to <code>false</code>, the items on the MenuBar control correspond to the immediate descendants of the root node. This flag has no effect on data providers without root nodes, like Lists and Arrays.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["true"]}, | |
{ "tagName": "see", | |
"values": ["#hasRoot"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "method", | |
"qname": "measure", | |
"namespace": "protected", | |
"bindable": [], | |
"details": ["override"], | |
"deprecated": {}, | |
"description": "Calculates the preferred width and height of the MenuBar based on the default widths of the MenuBar items.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "void", | |
"params": []} | |
, | |
{ "type": "method", | |
"qname": "getLayoutHost", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"return": "org.apache.royale.core.ILayoutHost", | |
"params": []} | |
] | |
, | |
"events": [ | |
{ "qname": "itemClick", | |
"type": "mx.events.MenuEvent" | |
, | |
"description": "Dispatched when the user selects an item in a pop-up submenu.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "eventType", | |
"values": ["mx.events.MenuEvent.ITEM_CLICK"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "qname": "menuShow", | |
"type": "mx.events.MenuEvent" | |
, | |
"description": "Dispatched when a pop-up submenu opens, or the user selects a menu bar item with no drop-down menu.", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "eventType", | |
"values": ["mx.events.MenuEvent.MENU_SHOW"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}] | |
} |