blob: eef48a1a60e660e5988a4390638f092bc63fbdb0 [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.ToggleButtonBar",
"baseClassname": "mx.core.UIComponent"
,
"description": "The ToggleButtonBar control defines a horizontal or vertical group of buttons that maintain their selected or deselected state. Only one button in the ToggleButtonBar control can be in the selected state. This means that when a user selects a button in a ToggleButtonBar control, the button stays in the selected state until the user selects a different button. <p>If you set the <code>toggleOnClick</code> property of the ToggleButtonBar container to <code>true</code>, selecting the currently selected button deselects it. By default the <code>toggleOnClick</code> property is set to <code>false</code>.</p> <p>You can use the ButtonBar control to define a group of push buttons.</p> <p>The typical use for a toggle button is for maintaining selection among a set of options, such as switching between views in a ViewStack container.</p> <p>The ToggleButtonBar control creates Button controls based on the value of its <code>dataProvider</code> property. Even though ToggleButtonBar is a subclass of Container, do not use methods such as <code>Container.addChild()</code> and <code>Container.removeChild()</code> to add or remove Button controls. Instead, use methods such as <code>addItem()</code> and <code>removeItem()</code> to manipulate the <code>dataProvider</code> property. The ToggleButtonBar control automatically adds or removes the necessary children based on changes to the <code>dataProvider</code> property.</p> <p>To control the styling of the buttons of the ToggleButtonBar control, use the <code>buttonStyleName</code>, <code>firstButtonStyleName</code>, and <code>lastButtonStyleName</code> style properties; do not try to style the individual Button controls that make up the ToggleButtonBar control.</p> <p>ToggleButtonBar control has the following default characteristics:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Preferred size</td> <td>Wide enough to contain all buttons with their label text and icons, if any, plus any padding and separators, and high enough to accommodate the button height.</td> </tr> <tr> <td>Control resizing rules</td> <td>The controls do not resize by default. Specify percentage sizes if you want your ToggleButtonBar to resize based on the size of its parent container.</td> </tr> <tr> <td>selectedIndex</td> <td>Determines which button will be selected when the control is created. The default value is &quot;0&quot; and selects the leftmost button in the bar. Setting the selectedIndex property to &quot;-1&quot; deselects all buttons in the bar.</td> </tr> <tr> <td>Padding</td> <td>0 pixels for the top, bottom, left, and right properties.</td> </tr> </table> <p>The <code>&lt;mx:ToggleButtonBar&gt;</code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n &lt;mx:ToggleButtonBar\\n <b>Properties</b>\\n selectedIndex=&quot;0&quot;\\n toggleOnClick=&quot;false|true&quot;\\n \\n <b>Styles</b>\\n selectedButtonTextStyleName=&quot;<i>Name of CSS style declaration that specifies styles for the text of the selected button.</i>&quot;&gt;\\n ...\\n <i>child tags</i>\\n ...\\n &lt;/mx:ToggleButtonBar&gt;\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/ToggleButtonBarExample.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.ButtonBar", "mx.controls.LinkBar"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.controls.ToggleButtonBar",
"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-write",
"return": "Array",
"qname": "buttonWidths",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.html.beads.models.ButtonBarModel#buttonWidths"]},
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6"]},
{ "tagName": "productversion",
"values": ["Royale 0.9"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.html.beads.models.ButtonBarModel"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "widthType",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.html.beads.models.ButtonBarModel#widthType"]},
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6"]},
{ "tagName": "productversion",
"values": ["Royale 0.9"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.html.beads.models.ButtonBarModel"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "dataProvider",
"namespace": "public",
"bindable": ["collectionChange"],
"details": [],
"deprecated": {},
"description": "Set of data to be viewed. This property lets you use most types of objects as data providers. If you set the <code>dataProvider</code> property to an Array, it will be converted to an ArrayCollection. If you set the property to an XML object, it will be converted into an XMLListCollection with only one item. If you set the property to an XMLList, it will be converted to an XMLListCollection. If you set the property to an object that implements the IList or ICollectionView interface, the object will be used directly. <p>As a consequence of the conversions, when you get the <code>dataProvider</code> property, it will always be an ICollectionView, and therefore not necessarily be the type of object you used to you set the property. This behavior is important to understand if you want to modify the data in the data provider: changes to the original data may not be detected, but changes to the ICollectionView object that you get back from the <code>dataProvider</code> property will be detected.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "see",
"values": ["mx.collections.ICollectionView"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.core.ISelectionModel"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "selectedIndex",
"namespace": "public",
"bindable": ["change","valueCommit"],
"details": [],
"deprecated": {},
"description": "The index in the data provider of the selected item. <p>The default value is -1 (no selected item).</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.core.ISelectionModel"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "toggleOnClick",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Specifies whether the currently selected button can be deselected by the user. By default, the currently selected button gets deselected automatically only when another button in the group is selected. Setting this property to <code>true</code> lets the user deselect it. When the currently selected button is deselected, the <code>selectedIndex</code> property is set to <code>-1</code>.",
"tags": [
{ "tagName": "default",
"values": ["false"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "getLayoutHost",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns the ILayoutHost which is its view. From ILayoutParent.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6"]},
{ "tagName": "productversion",
"values": ["Royale 0.8"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.core.ILayoutHost"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "org.apache.royale.core.ILayoutHost",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "buttonWidth",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredWidth",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredHeight",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]}]
,
"events": [
{ "qname": "itemClick",
"type": "mx.events.ItemClickEvent"
,
"description": "Dispatched when a user clicks a button. This event is only dispatched if the <code>dataProvider</code> property does not refer to a ViewStack container.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.ItemClickEvent.ITEM_CLICK"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}