blob: e19e5127324e4cfc7e88ee7e8617635d02d0041d [file] [log] [blame]
{ "type": "class",
"qname": "mx.containers.ViewStack",
"baseClassname": "mx.core.Container"
,
"description": "An MX ViewStack navigator container consists of a collection of child containers stacked on top of each other, where only one child at a time is visible. When a different child container is selected, it seems to replace the old one because it appears in the same location. However, the old child container still exists; it is just invisible. <p><b>Note:</b> The direct children of an MX navigator container must be MX containers, either MX layout or MX navigator containers, or the Spark NavigatorContent container. You cannot directly nest a control or a Spark container other than the Spark NavigatorContent container within a navigator; they must be children of an child MX container.</p> <p>A ViewStack container does not provide a user interface for selecting which child container is currently visible. Typically, you set its <code>selectedIndex</code> or <code>selectedChild</code> property in ActionScript in response to some user action. Alternately, you can associate an MX LinkBar, TabBar, ButtonBar, or ToggleButtonBar control or a Spark ButtonBar control with a ViewStack container to provide a navigation interface. To do so, specify the ViewStack container as the value of the <code>dataProvider</code> property of the LinkBar, TabBar or ToggleButtonBar container.</p> <p>You might decide to use a more complex navigator container than the ViewStack container, such as a TabNavigator container or Accordion container. In addition to having a collection of child containers, these containers provide their own user interface controls for navigating between their children.</p> <p>When you change the currently visible child container, you can use the <code>hideEffect</code> property of the container being hidden and the <code>showEffect</code> property of the newly visible child container to apply an effect to the child containers. The ViewStack container waits for the <code>hideEffect</code> of the child container being hidden to complete before it reveals the new child container. You can interrupt a currently playing effect if you change the <code>selectedIndex</code> property of the ViewStack container while an effect is playing.</p> <p>The ViewStack container has the following default sizing characteristics:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>The width and height of the initial active child.</td> </tr> <tr> <td>Container resizing rules</td> <td>By default, ViewStack containers are sized only once to fit the size of the first child container. They do not resize when you navigate to other child containers. To force ViewStack containers to resize when you navigate to a different child container, set the resizeToContent property to true.</td> </tr> <tr> <td>Child sizing rules</td> <td>Children are sized to their default size. If the child is larger than the ViewStack container, it is clipped. If the child is smaller than the ViewStack container, it is aligned to the upper-left corner of the ViewStack container.</td> </tr> <tr> <td>Default padding</td> <td>0 pixels for top, bottom, left, and right values.</td> </tr> </table> <p>The <code>&lt;mx:ViewStack&gt;</code> tag inherits the tag attributes of its superclass, with the exception of scrolling-related attributes, and adds the following tag attributes:</p> <pre>\\n &lt;mx:ViewStack\\n <b>Properties</b>\\n historyManagementEnabled=&quot;false|true&quot;\\n resizeToContent=&quot;false|true&quot;\\n selectedIndex=&quot;0&quot;\\n \\n <b>Styles</b>\\n horizontalGap=&quot;8&quot;\\n paddingBottom=&quot;0&quot;\\n paddingTop=&quot;0&quot;\\n verticalGap=&quot;6&quot;\\n \\n <b>Events</b>\\n change=&quot;<i>No default</i>&quot;\\n &gt;\\n ...\\n <i>child tags</i>\\n ...\\n &lt;/mx:ViewStack&gt;\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/ViewStackExample.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.LinkBar", "mx.controls.ButtonBar", "mx.controls.TabBar", "mx.controls.ToggleButtonBar", "spark.components.ButtonBar", "mx.managers.HistoryManager", "mx.managers.LayoutManager"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.containers.ViewStack",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "field",
"qname": "vsMinHeight",
"return": "Number",
"namespace": "mx_internal",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "field",
"qname": "vsPreferredWidth",
"return": "Number",
"namespace": "mx_internal",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "field",
"qname": "vsPreferredHeight",
"return": "Number",
"namespace": "mx_internal",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "contentHeight",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The height of the area, in pixels, in which content is displayed. You can override this getter if your content does not occupy the entire area of the ViewStack container.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "contentWidth",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The width of the area, in pixels, in which content is displayed. You can override this getter if your content does not occupy the entire area of the ViewStack container.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "contentX",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The x coordinate of the area of the ViewStack container in which content is displayed, in pixels. The default value is equal to the value of the <code>paddingLeft</code> style property, which has a default value of 0. Override the <code>get()</code> method if you do not want your content to start layout at x = 0.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "contentY",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The y coordinate of the area of the ViewStack container in which content is displayed, in pixels. The default value is equal to the value of the <code>paddingTop</code> style property, which has a default value of 0. Override the <code>get()</code> method if you do not want your content to start layout at y = 0.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "resizeToContent",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "If <code>true</code>, the ViewStack container automatically resizes to the size of its current child.",
"tags": [
{ "tagName": "default",
"values": ["false"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "mx.core.INavigatorContent",
"qname": "selectedChild",
"namespace": "public",
"bindable": ["creationComplete","valueCommit"],
"details": [],
"deprecated": {},
"description": "A reference to the currently visible child container. The default is a reference to the first child. If there are no children, this property is <code>null</code>. <p><strong>Note:</strong> You can only set this property in an ActionScript statement, not in MXML.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "selectedIndex",
"namespace": "public",
"bindable": ["change","creationComplete","valueCommit"],
"details": [],
"deprecated": {},
"description": "The zero-based index of the currently visible child container. Child indexes are in the range 0, 1, 2, ..., n - 1, where <i>n</i> is the number of children. The default value is 0, corresponding to the first child. If there are no children, the value of this property is <code>-1</code>. <p><strong>Note:</strong> When you add a new child to a ViewStack container, the <code>selectedIndex</code> property is automatically adjusted, if necessary, so that the selected child remains selected.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "measure",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "Calculates the default sizes and minimum and maximum values of the ViewStack container. For more information about the <code>measure()</code> method, see the <code>UIComponent.measure()</code> method. <p>The default size of a ViewStack container is the default size of its currently selected child, plus the padding and borders. If the ViewStack container has no children, its default size is just large enough for its padding and borders.</p> <p>The minimum size of a ViewStack container is the minimum size of its currently selected child, plus the padding and borders. If the ViewStack container has no children, its minimum size is just large enough for its padding and borders.</p> <p>This method does not change the maximum size of a ViewStack container - it remains unbounded.</p>",
"tags": [
{ "tagName": "see",
"values": ["mx.core.UIComponent#measure()"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "updateDisplayList",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "Responds to size changes by setting the positions and sizes of this container's children. For more information about the <code>updateDisplayList()</code> method, see the <code>UIComponent.updateDisplayList()</code> method. <p>Only one of its children is visible at a time, therefore, a ViewStack container positions and sizes only that child.</p> <p>The selected child is positioned in the ViewStack container's upper-left corner, and allows for the ViewStack container's padding and borders. </p> <p>If the selected child has a percentage <code>width</code> or <code>height</code> value, it is resized in that direction to fill the specified percentage of the ViewStack container's content area (i.e., the region inside its padding).</p> in the component's coordinates, regardless of the value of the <code>scaleX</code> property of the component. in the component's coordinates, regardless of the value of the <code>scaleY</code> property of the component.",
"tags": [
{ "tagName": "see",
"values": ["mx.core.UIComponent#updateDisplayList()"]},
{ "tagName": "param",
"values": ["unscaledWidth Specifies the width of the component, in pixels,", "unscaledHeight Specifies the height of the component, in pixels,"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "unscaledWidth", "type": "Number"},
{ "name": "unscaledHeight", "type": "Number"}]}
,
{ "type": "method",
"qname": "saveState",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.managers.IHistoryManagerClient#saveState()"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Object",
"params": []}
,
{ "type": "method",
"qname": "loadState",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "copy",
"values": ["mx.managers.IHistoryManagerClient#loadState()"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "state", "type": "Object"}]}
,
{ "type": "method",
"qname": "commitSelectedIndex",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Commits the selected index. This function is called during the commit properties phase when the <code>selectedIndex</code> or <code>selectedItem</code> property changes.",
"tags": [
{ "tagName": "param",
"values": ["newIndex The selected index."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "newIndex", "type": "int"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "int",
"qname": "length",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "IList implementation of length returns numChildren",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "method",
"qname": "addedToParent",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "setActualSize",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "void",
"params": [{ "name": "w", "type": "Number"},
{ "name": "h", "type": "Number"}]}
]
,
"events": [
{ "qname": "change",
"type": "mx.events.IndexChangedEvent"
,
"description": "Dispatched when the selected child container changes.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.IndexChangedEvent.CHANGE"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}