| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <apiPackage id="mx.containers"><apiName>mx.containers</apiName><apiDetail/><apiClassifier id="mx.containers:Canvas"><apiName>Canvas</apiName><shortdesc> |
| Halo Canvas 布局容器定义一个矩形区域,在该区域中可以放置子容器和控件。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="paddingTop"/><Exclude kind="style" name="paddingRight"/><Exclude kind="style" name="paddingLeft"/><Exclude kind="style" name="paddingBottom"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Alternative owner="mx.containers:Canvas" replacement="spark.components.BorderContainer" since="4.0"> |
| </Alternative><Alternative owner="mx.containers:Canvas" replacement="spark.components.Group" since="4.0"> |
| </Alternative></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:Canvas></code> tag inherits all the tag attributes |
| of its superclass. Use the following syntax:</p> |
| |
| <p> |
| <pre> |
| <mx:Canvas> |
| ... |
| <i>child tags</i> |
| ... |
| </mx:Canvas> |
| </pre> |
| </p> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseInterface>mx.containers.utilityClasses:IConstraintLayout</apiBaseInterface><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| Halo Canvas 布局容器定义一个矩形区域,在该区域中可以放置子容器和控件。只有在此容器中,您才可以使用各子项的 <codeph>x</codeph> 和 <codeph>y</codeph> 属性明确指定各子项的位置。 |
| |
| <p><b>注意:</b>Adobe 建议您,如果可能,请使用带有 BasicLayout 的 Spark 容器,而不使用 Halo Canvas 容器。</p> |
| |
| <p>Flex 将 Canvas 布局容器的子项设置为其首选宽度和首选高度。通过将某个子项的 <codeph>width</codeph> 属性设置为固定的像素值或容器大小的百分比,可以覆盖该子项的首选宽度值。您还可以使用类似的方式设置首选高度。</p> |
| |
| <p>如果在 Canvas 容器内部使用百分比来调整大小,可能会导致部分组件重叠。如果您不希望出现重叠,请仔细设置组件的位置和大小。</p> |
| |
| <p>Canvas 容器具有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>足够容纳其大小为默认值的所有子项</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右值均为 0 像素</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="SimpleCanvasExample.mxml"><swfblock conref="examples/SimpleCanvasExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.core.xml#Container"><linktext>mx.core.Container</linktext></link></related-links><apiConstructor id="mx.containers:Canvas:Canvas"><apiName>Canvas</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:Canvas:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算 Canvas 的首选最小大小和首选最大大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算 Canvas 的首选最小大小和首选最大大小。 |
| |
| <p>Canvas 的 <codeph>measuredWidth</codeph> 恰好能够在所有子项均采用首选宽度时完全显示这些子项(不发生剪裁)。此 <codeph>measure()</codeph> 方法计算最右侧的子项的位置,然后计算该子项右边缘的位置,最后为 Canvas 容器的边界和右侧填充的厚度添加空间。<codeph>measuredHeight</codeph> 的计算与此类似。</p> |
| |
| <p>不计算 Canvas 容器的 <codeph>minWidth</codeph> 和 <codeph>minHeight</codeph> 属性,因此 Flex 使用默认值 0。</p> |
| |
| <p>不计算 Canvas 容器的 <codeph>maxWidth</codeph> 和 <codeph>maxHeight</codeph> 属性。假定此容器的最大宽度和高度没有限制。</p> |
| |
| <p>上述所有值均为 Canvas 的<i>测量</i>宽度和高度。用户可以通过显式提供下列属性的值来覆盖测量值:</p> |
| |
| <ul> |
| <li><codeph>width</codeph></li> |
| <li><codeph>height</codeph></li> |
| <li><codeph>minWidth</codeph></li> |
| <li><codeph>minHeight</codeph></li> |
| <li><codeph>maxWidth</codeph></li> |
| <li><codeph>maxHeight</codeph></li> |
| </ul> |
| |
| <p>不应该直接调用此方法。Flex LayoutManager 会在合适的时间调用此方法。启动应用程序时,Flex LayoutManager 将首先尝试测量包括子项和父项在内的所有组件,然后将其设置为最终大小。</p> |
| |
| <p>此方法是在细分过程中使用的高级方法。如果覆盖此方法,则必须通过调用 <codeph>super.measure()</codeph> 方法,或者设置 <codeph>measuredHeight</codeph> 和 <codeph>measuredWidth</codeph> 属性来实现此效果。您还可以选择设置下列属性: |
| <ul> |
| <li><codeph>measuredMinWidth</codeph></li> |
| <li><codeph>measuredMinHeight</codeph></li> |
| </ul> |
| 这些属性对应于上面列出的布局属性,所以不再单独介绍。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Canvas:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 设置容器的各子项的大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 设置容器的各子项的大小。 |
| |
| <p>Canvas 不会更改其子项的位置。每个子项都是根据各自的 <codeph>x</codeph> 和 <codeph>y</codeph> 属性的值来放置的。</p> |
| |
| <p>如果没有提供 <codeph>width</codeph> 和 <codeph>height</codeph> 值,则 Canvas 会将各子项的宽度和高度设置为该子项的 <codeph>measuredWidth</codeph> 和 <codeph>measuredHeight</codeph> 值。通过将 <codeph>width</codeph> 和/或 <codeph>height</codeph> 设置为百分比值,可以调整子项的大小。可调整大小的子项由 Canvas 容器的右边缘和底部边缘绑定。此时,将使用子项的 <codeph>minWidth</codeph>、<codeph>minHeight</codeph>、<codeph>maxWidth</codeph> 和 <codeph>maxHeight</codeph> 值。</p> |
| |
| <p>不应该直接调用此方法。Flex LayoutManager 会在合适的时间调用此方法。启动应用程序时,Flex LayoutManager 将对各个组件调用 <codeph>updateDisplayList()</codeph> 方法,从应用程序对象开始,依次向下。</p> |
| |
| <p>此方法是在细分过程中使用的高级方法。如果覆盖此方法,则应调用 <codeph>super.updateDisplayList()</codeph> 方法,并对各个子项调用 <codeph>move()</codeph> 和 <codeph>setActualSize()</codeph> 方法来实现此效果。要执行布局,您应该从 <codeph>unscaledWidth</codeph> 和 <codeph>unscaledHeight</codeph> 属性中获取此容器的大小,而不是从 <codeph>width</codeph> 和 <codeph>height</codeph> 属性中进行获取。对于此容器,<codeph>width</codeph> 和 <codeph>height</codeph> 属性无需考虑 <codeph>scaleX</codeph> 和 <codeph>scaleY</codeph> 属性的值。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiValue id="mx.containers:Canvas:constraintColumns:get"><apiName>constraintColumns</apiName><shortdesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintColumns"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Array"/></apiValueDef><apiDesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintColumns"> |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Canvas:constraintRows:get"><apiName>constraintRows</apiName><shortdesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintRows"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Array"/></apiValueDef><apiDesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintRows"> |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:FormItemDirection"><apiName>FormItemDirection</apiName><shortdesc> |
| FormItemDirection 类定义 FormItem 类的 direction 属性的常数值。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc> |
| FormItemDirection 类定义 FormItem 类的 <codeph>direction</codeph> 属性的常量值。 |
| |
| </apiDesc></apiClassifierDetail><related-links><link href="mx.containers.xml#FormItem"><linktext>mx.containers.FormItem</linktext></link></related-links><apiValue id="mx.containers:FormItemDirection:HORIZONTAL"><apiName>HORIZONTAL</apiName><shortdesc> |
| 指定在水平方向上布置 FormItem 容器的子容器。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>horizontal</apiData><apiType value="String"/></apiValueDef><apiDesc> |
| 指定在水平方向上布置 FormItem 容器的子容器。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:FormItemDirection:VERTICAL"><apiName>VERTICAL</apiName><shortdesc> |
| 指定在垂直方向上布置 FormItem 容器的子容器。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>vertical</apiData><apiType value="String"/></apiValueDef><apiDesc> |
| 指定在垂直方向上布置 FormItem 容器的子容器。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:DividedBox"><apiName>DividedBox</apiName><shortdesc> |
| DividedBox 容器在水平或垂直方向上度量和布置其子容器的方式与 Box 容器完全相同,只不过它在子容器之间的间隙处插入了可拖动的分隔符。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><styles><style inherit="no" name="verticalDividerCursor" owner="mx.containers:DividedBox" playerVersion="Flash9" type="Class"> |
| <description> |
| 垂直 DividedBox 的光标外观。默认值为 Assets.swf 文件中的“mx.skins.cursor.VBoxDivider”元件。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="horizontalDividerCursor" owner="mx.containers:DividedBox" playerVersion="Flash9" type="Class"> |
| <description> |
| 水平 DividedBox 的光标外观。默认值为 Assets.swf 文件中的“mx.skins.cursor.HBoxDivider”元件。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="dividerThickness" owner="mx.containers:DividedBox" playerVersion="Flash9" type="Number"> |
| <description> |
| 如果将 <codeph>liveDragging</codeph> 属性设置为 <codeph>false</codeph>,表示用户按下或拖动分隔符时分隔符的厚度(以像素为单位)。(如果将 <codeph>liveDragging</codeph> 属性设置为 <codeph>true</codeph>,则只显示分隔符的旋钮。)可见厚度不能设置为大于提供的值。 |
| |
| </description> |
| <default>3 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="dividerSkin" owner="mx.containers:DividedBox" playerVersion="Flash9" type="Class"> |
| <description> |
| 分隔符外观。默认值为 Assets.swf 文件中的“mx.skin.BoxDividerSkin”元件。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Color" inherit="yes" name="dividerColor" owner="mx.containers:DividedBox" playerVersion="Flash9" type="uint"> |
| <description> |
| 如果将 <codeph>liveDragging</codeph> 属性设置为 <codeph>false</codeph>,该值表示用户按下或拖动分隔符时分隔符的颜色。如果将 <codeph>liveDragging</codeph> 属性设置为 <codeph>true</codeph>,则只显示分隔符的旋钮。 |
| |
| </description> |
| <default>0x6F7777 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="dividerAlpha" owner="mx.containers:DividedBox" playerVersion="Flash9" type="Number"> |
| <description> |
| 确定分隔符透明度的 Alpha 值。值为 <codeph>0.0</codeph> 表示完全透明,值为 <codeph>1.0</codeph> 表示完全不透明。 |
| |
| </description> |
| <default>0.75 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="dividerAffordance" owner="mx.containers:DividedBox" playerVersion="Flash9" type="Number"> |
| <description> |
| 用户可在其中单击以拖动分隔符的区域的厚度(以像素为单位)。该区域位于容器的子容器之间的间隙的中心,这些间隙由 <codeph>horizontalGap</codeph> 或 <codeph>verticalGap</codeph> 样式属性确定。提供的值不能设为大于间隙大小的值。将鼠标悬停在该区域上方时,将显示大小调整光标。 |
| |
| </description> |
| <default>6 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:DividedBox></code> tag inherits all of the tag |
| attributes of its superclass, and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:DividedBox |
| <strong>Properties</strong> |
| liveDragging="false|true" |
| resizeToContent="false|true" |
| |
| <strong>Styles</strong> |
| dividerAffordance="6" |
| dividerAlpha="0.75" |
| dividerColor="0x6F7777" |
| dividerSkin="<i>'mx.skins.BoxDividerSkin' symbol in Assets.swf</i>" |
| dividerThickness="3" |
| horizontalDividerCursor="<i>'mx.skins.cursor.HBoxDivider' symbol in Assets.swf</i>" |
| verticalDividerCursor="<i>'mx.skins.cursor.VBoxDivider' symbol in Assets.swf</i>" |
| |
| <strong>Events</strong> |
| dividerPress="<i>No default</i>" |
| dividerDrag="<i>No default</i>" |
| dividerRelease="<i>No default</i>" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:DividedBox> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:Box</apiBaseClassifier></apiClassifierDef><apiDesc> |
| DividedBox 容器在水平或垂直方向上度量和布置其子容器的方式与 Box 容器完全相同,只不过它在子容器之间的间隙处插入了可拖动的分隔符。用户可以拖动任何分隔符以调整每侧的子容器。 |
| |
| <p>DividedBox 类是较常用的 HDividedBox 类和 VDividedBox 类的基类。</p> |
| |
| <p>DividedBox 容器的 <codeph>direction</codeph> 属性(继承自 Box 容器)确定它是采用水平布局还是垂直布局。</p> |
| |
| <p>DividedBox、HDividedBox 或 VDividedBox 容器具有下列默认大小特性:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry><b>垂直 DividedBox</b> 高度足以容纳它的所有子容器(其大小是子容器的默认高度或明确指定的高度与子容器之间的垂直间隙以及该容器上下填充之和)。宽度为最宽的子容器的默认宽度或明确指定的宽度与容器的左填充和右填充之和。<b>水平 DividedBox</b> 宽度足以容纳所有子容器(其大小为默认宽度或明确指定的宽度与子容器之间的水平间隙以及该容器的左右填充之和)。高度为最高子项的默认高度或明确指定的高度与容器的上下填充之和。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row><row> |
| <entry>默认间距</entry> |
| <entry>水平和垂直间距为 10 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="DividedBoxExample.mxml"><swfblock conref="examples/DividedBoxExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#HDividedBox"><linktext>mx.containers.HDividedBox</linktext></link><link href="mx.containers.xml#VDividedBox"><linktext>mx.containers.VDividedBox</linktext></link></related-links><adobeApiEvent id="mx.containers:DividedBox_mx.events.DividerEvent.DIVIDER_RELEASE_dividerRelease"><apiName>dividerRelease</apiName><shortdesc> |
| 用户释放分隔符时分派。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>mx.events.DividerEvent.DIVIDER_RELEASE</apiEventType><adobeApiEventClassifier>mx.events.DividerEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc> |
| 用户释放分隔符时分派。在从 <codeph>dividerDrag</codeph> 事件之后到调整容器的子容器大小这段时间内分派 <codeph>dividerRelease</codeph> 事件。直到触发此事件之后才更新分隔符的 x 和 y 属性。因此,调用 <codeph>hDividerBox.getDividerAt(0).x</codeph> 将返回第一个分隔符的原始 x 位置的值。如果需要得到分隔符移动后的位置,则可以在触发 DividerBox 的 updateComplete 事件后访问该分隔符。 |
| |
| </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="mx.containers:DividedBox_mx.events.DividerEvent.DIVIDER_PRESS_dividerPress"><apiName>dividerPress</apiName><shortdesc> |
| 用户按下此容器中的任何分隔符时分派。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>mx.events.DividerEvent.DIVIDER_PRESS</apiEventType><adobeApiEventClassifier>mx.events.DividerEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc> |
| 用户按下此容器中的任何分隔符时分派。在分派任何 <codeph>dividerDrag</codeph> 事件之前先分派 <codeph>dividerPress</codeph> 事件。 |
| |
| </apiDesc></adobeApiEventDetail></adobeApiEvent><adobeApiEvent id="mx.containers:DividedBox_mx.events.DividerEvent.DIVIDER_DRAG_dividerDrag"><apiName>dividerDrag</apiName><shortdesc> |
| 用户拖动任何分隔符时多次分派。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>mx.events.DividerEvent.DIVIDER_DRAG</apiEventType><adobeApiEventClassifier>mx.events.DividerEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc> |
| 用户拖动任何分隔符时多次分派。在从 <codeph>dividerPress</codeph> 事件到 <codeph>dividerRelease</codeph> 事件这段时间内分派 <codeph>dividerDrag</codeph> 事件。 |
| |
| </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="mx.containers:DividedBox:DividedBox"><apiName>DividedBox</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:DividedBox:getDividerAt"><apiName>getDividerAt</apiName><shortdesc> |
| 返回对此 DividedBox 容器中的指定 BoxDivider 对象的引用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>BoxDivider 对象。 |
| |
| </apiDesc><apiOperationClassifier>mx.containers.dividedBoxClasses:BoxDivider</apiOperationClassifier></apiReturn><apiParam><apiItemName>i</apiItemName><apiType value="int"/><apiDesc>从零开始的分隔符索引,从左(对于水平 DividedBox )或从上(对于垂直 DividedBox)开始计算。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 返回对此 DividedBox 容器中的指定 BoxDivider 对象的引用。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:DividedBox:moveDivider"><apiName>moveDivider</apiName><shortdesc> |
| 将特定分隔符移动给定像素数目。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>i</apiItemName><apiType value="int"/><apiDesc>从零开始的分隔符索引,从左(对于水平 DividedBox )或从上(对于垂直 DividedBox)开始计算。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>amt</apiItemName><apiType value="Number"/><apiDesc>将分隔符移动的像素数目。若要向上或向左移动分隔符,可指定一个负数。分隔符的移动方式必须与用户移动分隔符的方式相同。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 将特定分隔符移动给定像素数目。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiValue id="mx.containers:DividedBox:protected:dividerClass"><apiName>dividerClass</apiName><shortdesc> |
| 适用于子容器之间的分隔符的类。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiType value="Class"/><apiDefaultValue>mx.containers.dividedBoxClasses.BoxDivider |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 适用于子容器之间的分隔符的类。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:DividedBox:liveDragging"><apiName>liveDragging</apiName><shortdesc> |
| 如果为 true,则在用户拖动分隔符时,将不断地调整与分隔符相邻的子容器的大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiData>false</apiData><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果为 <codeph>true</codeph>,则在用户拖动分隔符时,将不断地调整与分隔符相邻的子容器的大小。如果为 <codeph>false</codeph>,则在用户释放分隔符之后才会调整它们的大小。 |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:DividedBox:numDividers:get"><apiName>numDividers</apiName><shortdesc> |
| 分隔符的数量。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiType value="int"/></apiValueDef><apiDesc> |
| 分隔符的数量。计数始终是 <codeph>numChildren</codeph> - 1。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:DividedBox:resizeToContent:get"><apiName>resizeToContent</apiName><shortdesc> |
| 如果为 true,则 DividedBox 将自动调整其子项的大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果为 <codeph>true</codeph>,则 DividedBox 将自动调整其子项的大小。 |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:ApplicationControlBar"><apiName>ApplicationControlBar</apiName><shortdesc> |
| ApplicationControlBar 容器存储为 Halo Application 容器提供全局导航和应用程序命令的组件。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="style" name="backgroundSize"/><Exclude kind="style" name="backgroundImage"/><Exclude kind="style" name="backgroundAttachment"/><Exclude kind="style" name="backgroundAlpha"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="direction"/><Alternative owner="mx.containers:ApplicationControlBar" replacement="none" since="4.0"> |
| <description> |
| 自 Flex 4 起,不再需要 ApplicationControlBar 组件。使用 Spark Application 类的 <codeph>controlBarContent</codeph> 属性来指定要包含在控件栏区域中的组件集。使用 Spark Application 类的 <codeph>controlBarLayout</codeph> 属性指定控件栏区域的布局。 |
| </description> |
| </Alternative><styles><style arrayType="uint" format="Color" inherit="no" name="fillColors" owner="mx.containers:ApplicationControlBar" playerVersion="Flash9" type="Array"> |
| <description> |
| 容器背景的着色颜色。为“均匀”外观控件的两个值传递相同的颜色。默认值是 <codeph>[0xFFFFFF,0xFFFFFF]</codeph>。 |
| |
| <p>您还应将 <codeph>fillAlphas</codeph> 属性设置为非默认值,因为其默认值 <codeph>[0,0]</codeph> 会使颜色不可见。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style arrayType="Number" inherit="no" name="fillAlphas" owner="mx.containers:ApplicationControlBar" playerVersion="Flash9" type="Array"> |
| <description> |
| 用于容器的背景填充的 Alpha 值。默认值是 <codeph>[0,0]</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:ApplicationControlBar></code> tag |
| inherits all of the tag attributes of its superclass, and adds the |
| following tag attributes. |
| Unlike the ControlBar container, it is possible to set the |
| <code>backgroundColor</code> style for an ApplicationControlBar |
| container.</p> |
| |
| <pre> |
| <mx:ApplicationControlBar |
| <strong>Properties</strong> |
| dock="false|true" |
| |
| <strong>Styles</strong> |
| fillAlphas="[0, 0]" |
| fillColors="[0xFFFFFF, 0xFFFFFF]" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:ApplicationControlBar> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:ControlBar</apiBaseClassifier></apiClassifierDef><apiDesc> |
| ApplicationControlBar 容器存储为 Halo Application 容器提供全局导航和应用程序命令的组件。例如,编辑器的 ApplicationControlBar 可以包括用于设置字体权重的 Button 控件、用于选择字体的 ComboBox 控件和用于选择编辑模式的 MenuBar 控件。通常将 ApplicationControlBar 容器放置在 Halo Application 容器的顶部。 |
| |
| <p><b>注意:</b>Spark Application 容器不支持 ApplicationControlBar 容器。请修改 Spark Application 容器的外观以添加此功能。</p> |
| |
| <p>ApplicationControlBar 容器可以使用下列模式之一:</p> |
| <ul> |
| <li>停靠模式:此栏总是位于应用程序绘图区的顶部,作为应用程序镶边的一部分。任何应用程序级滚动条都不应用于组件,以使其始终保留在可见区域的顶部,并进行扩展以填充应用程序的宽度。要创建停靠栏,需要将 <codeph>dock</codeph> 属性的值设置为 <codeph>true</codeph>。</li> |
| |
| <li>标准模式:此栏可以放置在应用程序中的任何位置,可以像其他组件一样设置大小和定位,以及在应用程序中滚动。要创建标准栏,需要将 <codeph>dock</codeph> 属性的值设置为 <codeph>false</codeph>(默认)。</li> |
| </ul> |
| |
| <p>ApplicationControlBar 容器有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>高度为最高子项的默认高度或明确指定的高度与容器的上下填充之和。在标准模式下,宽度足以容纳使用默认宽度或明确指定的宽度时的所有子项、子项间的任何水平间距,以及容器左右填充。在停靠模式下,宽度等于应用程序宽度。如果应用程序的宽度不足以包含 ApplicationControlBar 容器中的所有控件,将裁剪此栏。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>顶部值为 5 像素。底部值为 4 像素。左侧和右侧的值为 8 像素。 |
| </entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="SimpleApplicationControlBarExample.mxml"><swfblock conref="examples/SimpleApplicationControlBarExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.core.xml#Application"><linktext>mx.core.Application</linktext></link></related-links><apiConstructor id="mx.containers:ApplicationControlBar:ApplicationControlBar"><apiName>ApplicationControlBar</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiValue id="mx.containers:ApplicationControlBar:dock:get"><apiName>dock</apiName><shortdesc> |
| 如果为 true,则指定将 ApplicationControlBar 停靠在应用程序的顶部。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="dockChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果为 <codeph>true</codeph>,则指定将 ApplicationControlBar 停靠在应用程序的顶部。如果为 <codeph>false</codeph>,则指定像任何其他组件一样为 ApplicationControlBar 设置大小和定位。如果应用程序的类型为 <codeph>Application</codeph> ,则支持此属性,否则,<codeph>dock</codeph> 的值不起作用。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:HDividedBox"><apiName>HDividedBox</apiName><shortdesc> |
| HDividedBox 容器像 HBox 容器一样水平放置其子项,但会在各子项的间隔之间插入可拖动的分隔符。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="direction"/></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:HDividedBox></code> tag inherits all of the tag |
| attributes of its superclass except <code>direction</code> and adds |
| no new tag attributes.</p> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:DividedBox</apiBaseClassifier></apiClassifierDef><apiDesc> |
| HDividedBox 容器像 HBox 容器一样水平放置其子项,但会在各子项的间隔之间插入可拖动的分隔符。用户可以通过拖动此分隔符来调整分配给各子项的区域大小。<codeph><mx:HDividedBox/></codeph> 标签与 <codeph><mx:DividedBox direction="horizontal"/></codeph> 相同。 |
| |
| <p>HDividedBox 容器具有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>宽度足以容纳使用默认宽度或明确指定的宽度时的所有子项、子项间的任何水平间隔,以及容器的左右填充。高度为最高子项的默认高度或明确指定的高度与容器的上下填充之和。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row><row> |
| <entry>默认间距</entry> |
| <entry>水平和垂直间距为 10 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="HDividedBoxExample.mxml"><swfblock conref="examples/HDividedBoxExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#DividedBox"><linktext>mx.containers.DividedBox</linktext></link><link href="mx.containers.xml#VDividedBox"><linktext>mx.containers.VDividedBox</linktext></link></related-links><apiConstructor id="mx.containers:HDividedBox:HDividedBox"><apiName>HDividedBox</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="mx.containers:Grid"><apiName>Grid</apiName><shortdesc> |
| Grid 容器允许您按单元格的行和列来排列子项,这与 HTML 表相似。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="direction"/><styles><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:Grid" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。默认值为 6。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:Grid" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。默认值为 8。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ <p>The <code><mx:Grid></code> tag inherits all of the tag |
| attributes of its superclass, except the <code>Box.direction</code> |
| property, and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:Grid |
| <strong>Styles</strong> |
| horizontalGap="8" |
| verticalGap="6" |
| > |
| ... |
| <i>These child tags are examples only:</i> |
| <mx:GridRow id="row1"> |
| <mx:GridItem |
| rowSpan="1" |
| colSpan="1"> |
| <mx:Button label="Button 1"/> |
| </mx:GridItem> |
| ... |
| </mx:GridRow> |
| ... |
| </mx:Grid> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:Box</apiBaseClassifier></apiClassifierDef><apiDesc> |
| Grid 容器允许您按单元格的行和列来排列子项,这与 HTML 表相似。Grid 容器包含一行或多行,并且每行可以包含一个或多个单元格或项目。您应使用下列标签来定义 Grid 控件: |
| <ul> |
| <li><codeph><mx:Grid></codeph> 标签定义 Grid 容器。</li> |
| |
| <li><codeph><mx:GridRow></codeph> 标签定义网格行,其中包含一个或多个单元格。网格行必须是 <codeph><Grid></codeph> 标签的子项。</li> |
| |
| <li><codeph><mx:GridItem></codeph> 标签定义网格单元格,该标签必须是 <codeph><GridRow></codeph> 标签的子项。<codeph><mx:GridItem></codeph> 标签可以包含任意数目的子项。</li> |
| </ul> |
| |
| <p>每一行中所有单元格的高度都相同,但各行的高度可以不同。每一列中所有单元格的宽度都相同,但各列的宽度可以不同。您可以为 Grid 容器中的各行或各列定义不同数目的单元格。此外,一个单元格可以跨越容器中的多列或多行。</p> |
| |
| <p>Grid、GridRow 和 GridItem 容器具有下列默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>网格高度</entry> |
| <entry>所有行的默认或显式高度之和加上各行之间的间距。</entry> |
| </row><row> |
| <entry>网格宽度</entry> |
| <entry>所有列的默认或显式宽度之和加上各列之间的间距。</entry> |
| </row><row> |
| <entry>每行以及每个单元格的高度</entry> |
| <entry>默认值或行中最高项目的显式高度。如果 GridItem 容器未设定显式大小,则其默认高度为单元格中子项的默认或显式高度。</entry> |
| </row><row> |
| <entry>每列以及每个单元格的宽度</entry> |
| <entry>默认值或列中最宽项目的显式宽度。如果 GridItem 容器未设定显式宽度,则其默认宽度为单元格中子项的默认或显式宽度。</entry> |
| </row><row> |
| <entry>行与列的间距</entry> |
| <entry>由 Grid 类的 horizontalGap 和 verticalGap 样式确定。这两个间距的默认值是 6 个像素。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>所有三个容器类的 top、bottom、left 和 right 值均为 0 个像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| </apiDesc><example conref="GridLayoutExample.mxml"><swfblock conref="examples/GridLayoutExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#GridRow"><linktext>mx.containers.GridRow</linktext></link><link href="mx.containers.xml#GridItem"><linktext>mx.containers.GridItem</linktext></link></related-links><apiConstructor id="mx.containers:Grid:Grid"><apiName>Grid</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:Grid:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算 Grid 的首选大小、最小大小和最大大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算 Grid 的首选大小、最小大小和最大大小。 |
| <p>您不应直接调用此方法;此方法是用于细分类的高级方法。Flex LayoutManger 会在合适的时间调用 <codeph>measure()</codeph> 方法。启动应用程序时,Flex LayoutManager 将首先尝试测量包括子项和父项在内的所有组件,然后将其设置为最终大小。</p> |
| <p>要了解 Grid 容器如何计算其测量值,请假设每个 GridItem 容器的 <codeph>rowSpan</codeph> 属性和 <codeph>colSpan</codeph> 属性都已设置为 1。Grid 容器中第一列的测量宽度是第一列中所有 GridItem 容器的测量宽度中的最大值。同样,第二列的测量宽度是第二列中所有 GridItem 容器的测量宽度中的最大值,依此类推。整个 Grid 容器的 <codeph>measuredWidth</codeph> 是所有列的测量宽度之和加上边框粗细、左右填充以及相邻网格单元格间的水平间距。</p> |
| <p><codeph>measuredHeight</codeph>、<codeph>minWidth</codeph>、<codeph>minHeight</codeph>、<codeph>maxWidth</codeph> 以及 <codeph>maxHeight</codeph> 属性值计算方法类似,都是通过将 GridItem 容器的 <codeph>measuredHeight</codeph>、<codeph>minWidth</codeph> 等属性值累加得到的。</p> |
| <p>如果 GridItem 容器的 <codeph>colSpan</codeph> 属性为 3,则该 GridItem 容器的 <codeph>measuredWidth</codeph> 将在 3 个列之间进行分配。如果是等分 <codeph>measuredWidth</codeph>,则三列中的每一列在计算其测量宽度时都假设 GridItem 容器仅位于该列中,并且 GridItem 容器的 <codeph>measuredWidth</codeph> 是其实际值的 1/3。</p> |
| <p>但是,GridItem 容器的 <codeph>measuredWidth</codeph> 属性在其跨越的所有列之间并非始终等分。如果部分列的属性是 <codeph>width</codeph> 的百分比值,则 GridItem 容器的 <codeph>measuredWidth</codeph> 属性将进行相应划分,尝试为每列设置所请求的 Grid 容器百分比值。</p> |
| <p>上述所有值都是 Grid 的<i>测量</i>宽度和高度。用户可以通过显式为下列属性提供值来覆盖测量值:</p> |
| <ul> |
| <li><codeph>minHeight</codeph></li> |
| <li><codeph>minWidth</codeph></li> |
| <li><codeph>maxHeight</codeph></li> |
| <li><codeph>maxWidth</codeph></li> |
| <li><codeph>height</codeph></li> |
| <li><codeph>width</codeph></li> |
| </ul> |
| <p>如果覆盖此方法,则实现必须调用 <codeph>super.measure()</codeph> 方法或设置 <codeph>measuredHeight</codeph> 和 <codeph>measuredWidth</codeph> 属性。您还可以选择设置下列属性:</p> |
| |
| <ul> |
| <li><codeph>measuredMinWidth</codeph></li> |
| <li><codeph>measuredMinHeight</codeph></li> |
| </ul> |
| |
| <p>这些属性对应于上面列出的布局属性,所以不再单独介绍。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Grid:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 设置 Grid 中每个子项的大小和位置。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 设置 Grid 中每个子项的大小和位置。 |
| <p>您不应直接调用此方法;此方法是用于细分类的高级方法。Flex LayoutManager 会在合适的时间调用 <codeph>updateDisplayList</codeph> 方法。启动应用程序时,Flex LayoutManager 将对每个组件调用 <codeph>updateDisplayList()</codeph> 方法,从根组件开始,依次向下。</p> |
| <p>Grid 容器与 VBox 容器的布局规则相同。计算 GridRow 容器的位置和大小的方法与 VBox 容器确定其子项的位置和大小的方法相同。同样,GridRow 容器定位其 GridItem 容器时也使用与 HBox 容器相似的布局算法。</p> |
| <p>唯一的区别是,所有的 GridRow 容器是需要相互协调的,因此均为其子项选择相同的位置和大小(以便 Grid 容器的列对齐)。 </p> |
| <p>如果覆盖此方法,则实现应调用 <codeph>super.updateDisplayList()</codeph> 方法并对每个子项调用 <codeph>move()</codeph> 和 <codeph>setActualSize()</codeph> 方法。要执行布局,您应该从 <codeph>unscaledWidth</codeph> 和 <codeph>unscaledHeight</codeph> 属性中获取此容器的大小,而不是从 <codeph>width</codeph> 和 <codeph>height</codeph> 属性中进行获取。<codeph>width</codeph> 和 <codeph>height</codeph> 属性与此容器的 <codeph>scaleX</codeph> 和 <codeph>scaleY</codeph> 属性值无关。</p> |
| </apiDesc></apiOperationDetail></apiOperation></apiClassifier><apiClassifier id="mx.containers:TabNavigator"><apiName>TabNavigator</apiName><shortdesc> |
| MX TabNavigator 容器通过包括一个用于在其子容器间导航的 TabBar 容器来扩展 MX ViewStack 容器。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="style" name="verticalScrollBarStyleName"/><Exclude kind="style" name="horizontalScrollBarStyleName"/><Exclude kind="style" name="fillColors"/><Exclude kind="style" name="fillAlphas"/><Exclude kind="event" name="scroll"/><Exclude kind="property" name="verticalScrollPosition"/><Exclude kind="property" name="verticalScrollPolicy"/><Exclude kind="property" name="verticalScrollBar"/><Exclude kind="property" name="verticalPageScrollSize"/><Exclude kind="property" name="verticalLineScrollSize"/><Exclude kind="property" name="maxVerticalScrollPosition"/><Exclude kind="property" name="maxHorizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPolicy"/><Exclude kind="property" name="horizontalScrollBar"/><Exclude kind="property" name="horizontalPageScrollSize"/><Exclude kind="property" name="horizontalLineScrollSize"/><Exclude kind="property" name="defaultButton"/><styles><style format="Length" inherit="no" name="tabOffset" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="Number"> |
| <description> |
| 选项卡栏与 TabNavigator 容器左边缘的水平偏移量(以像素为单位)。如果是正值,则向右移动选项卡栏。如果是负值,则向左移动选项卡栏。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="tabWidth" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="Number"> |
| <description> |
| 每个选项卡的宽度(以像素为单位)。默认值为 <codeph>undefined</codeph>。如果此属性为 <codeph>undefined</codeph>,则各选项卡的宽度由其标签文本的宽度确定,使用的字体样式为 TabNavigator 容器应用的字体样式。如果选项卡的总宽度大于 TabNavigator 容器的宽度,则计算后的选项卡宽度将减少,但最小只能降到 30 像素。如果设置了此属性,则指定的值将覆盖此计算值。 |
| |
| <p>如果选项卡上的标签文本不适合选项卡,将截断文本。如果截断选项卡标签,则在用户将鼠标滑过选项卡时,将显示含有完整标签文本的工具提示。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="tabStyleName" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="String"> |
| <description> |
| 指定选项卡样式的 CSS 样式声明名称。 |
| |
| </description> |
| <default>undefined |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="tabHeight" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="Number"> |
| <description> |
| 每个选项卡的高度(以像素为单位)。默认值为 <codeph>undefined</codeph>。此属性为 <codeph>undefined</codeph> 时,每个选项卡的高度将由应用于此 TabNavigator 容器的字体样式确定。如果设置了此属性,则指定的值将覆盖此计算值。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="selectedTabTextStyleName" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="String"> |
| <description> |
| 指定所选选项卡的文本样式的 CSS 样式声明名称。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="lastTabStyleName" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="String"> |
| <description> |
| 指定最后一个选项卡样式的 CSS 样式声明名称。如果未指定该样式,则使用 <codeph>tabStyleName</codeph> 样式属性的默认值。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="Number"> |
| <description> |
| 选项卡之间的间距(以像素为单位)。默认值为 -1,因此,相邻选项卡的边框将重叠。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="no" name="horizontalAlign" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="String"> |
| <description> |
| 此 TabNavigator 容器顶部的选项卡的水平位置。可能值包括 <codeph>"left"</codeph>、<codeph>"center"</codeph> 和 <codeph>"right"</codeph>。默认值为 <codeph>"left"</codeph>。 |
| |
| <p>如果值为 <codeph>"left"</codeph>,则第一个选项卡的左边缘将与 TabNavigator 容器的左边缘对齐。如果值为 <codeph>"right"</codeph>,则最后一个选项卡的右边缘将与 TabNavigator 容器的右边缘对齐。如果值为 <codeph>"center"</codeph>,则选项卡将位于 TabNavigator 容器顶部的中心位置。</p> |
| |
| <p>若要查看各个对齐方式之间的不同之处,所有选项卡的总宽度必须小于 TabNavigator 容器的宽度。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="firstTabStyleName" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="String"> |
| <description> |
| 指定第一个选项卡样式的 CSS 样式声明名称。如果未指定该样式,则使用 <codeph>tabStyleName</codeph> 样式属性的默认值。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="focusRoundedCorners" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="String"> |
| <description> |
| 指定焦点矩形的哪些角应该是圆角。此值是使用空格分隔的 String,该 String 可以是 <codeph>"tl"</codeph>、<codeph>"tr"</codeph>、<codeph>"bl"</codeph> 和 <codeph>"br"</codeph> 的任意组合。例如,要指定右侧的角为圆角,左侧的角为直角,应使用 <codeph>"tr br"</codeph>。<codeph>cornerRadius</codeph> 样式属性指定圆角的半径。默认值取决于组件类;如果未覆盖该类的默认值,则默认值为 <codeph>"tl tr bl br"</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="focusAlpha" owner="mx.containers:TabNavigator" playerVersion="Flash9" type="Number"> |
| <description> |
| 指定焦点外观的 alpha 透明度值。Halo 主题的默认值为 <codeph>0.4</codeph>。Spark 主题的默认值为 <codeph>0.55</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:TabNavigator></code> tag inherits all of the |
| tag attributes of its superclass, |
| and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:TabNavigator |
| <b>Styles</b> |
| firstTabStyleName="<i>Value of the</i> <code>tabStyleName</code> <i>property</i>" |
| focusAlpha="0.4" |
| focusRoundedCorners="tl tr bl br" |
| horizontalAlign="left|center|right" |
| horizontalGap="-1" |
| lastTabStyleName="<i>Value of the</i> <code>tabStyleName</code> <i>property</i>" |
| selectedTabTextStyleName="undefined" |
| tabHeight="undefined" |
| tabOffset="0" |
| tabStyleName="<i>Name of CSS style declaration that specifies styles for the tabs</i>" |
| tabWidth="undefined" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:TabNavigator> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseInterface>mx.managers:IFocusManagerComponent</apiBaseInterface><apiBaseClassifier>mx.containers:ViewStack</apiBaseClassifier></apiClassifierDef><apiDesc> |
| MX TabNavigator 容器通过包括一个用于在其子容器间导航的 TabBar 容器来扩展 MX ViewStack 容器。 |
| |
| <p><b>注意:</b>MX 导航器容器的直接子容器必须为 MX 容器(MX 布局或 MX 导航器容器)或者 Spark NavigatorContent 容器。您不能直接在某一导航器中嵌套控件或除 Spark NavigatorContent 容器之外的 Spark 容器;它们必须是子 MX 容器的子容器。</p> |
| |
| <p>与 ViewStack 容器类似,TabNavigator 容器包含一组子容器,其中一次只能显示一个子容器。Flex 将自动在 TabNavigator 容器的顶部创建一个 TabBar 容器,其中每个子容器均带有相应的选项卡。每个选项卡可以具有自己的标签和图标。用户单击选项卡时,相应的子容器将显示为 TabNavigator 容器的选定子容器。</p> |
| |
| <p>更改当前可见的子容器时,可使用要隐藏的容器的 <codeph>hideEffect</codeph> 属性和刚变为可见状态的子容器的 <codeph>showEffect</codeph> 属性将效果应用于子容器。TabNavigator 容器将等到要隐藏的子容器的 <codeph>hideEffect</codeph> 完成后才显示新的子容器。如果在播放效果的同时更改 TabNavigator 容器的 <codeph>selectedIndex</codeph> 属性,则会中断当前的播放效果。 </p> |
| |
| <p>若要定义 TabNavigator 中选项卡的外观,可在选项卡类型选择器中定义样式属性,如下例所示:</p> |
| <pre> |
| <fx:Style> |
| @namespace mx "library://ns.adobe.com/flex/mx" |
| mx|Tab { |
| fillColors: #006699, #cccc66; |
| upSkin: ClassReference("CustomSkinClass"); |
| overSkin: ClassReference("CustomSkinClass"); |
| downSkin: ClassReference("CustomSkinClass"); |
| } |
| </fx:Style> |
| </pre> |
| |
| <p>选项卡类型选择器可定义隐藏的 mx.controls.tabBarClasses.Tab 类上的值。选项卡类型选择器的默认值是在 defaults.css 文件中定义的。</p> |
| |
| <p>还可以使用 <codeph>tabStyleName</codeph> 样式属性在指定的类选择器中定义样式,例如:</p> |
| <pre> |
| <fx:Style> |
| @namespace mx "library://ns.adobe.com/flex/mx" |
| mx|TabNavigator { |
| tabStyleName:myTabStyle; |
| } |
| |
| .myTabStyle { |
| fillColors: #006699, #cccc66; |
| upSkin: ClassReference("CustomSkinClass"); |
| overSkin: ClassReference("CustomSkinClass"); |
| downSkin: ClassReference("CustomSkinClass"); |
| } |
| </fx:Style> |
| </pre> |
| |
| <p>TabNavigator 容器具有下列默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>第一个活动子项的默认宽度或明确指定的宽度和高度与选项卡的默认宽度或明确指定的高度和宽度之和。默认选项卡高度由应用于 TabNavigator 容器的字体、样式和外观确定。</entry> |
| </row><row> |
| <entry>容器大小调整规则</entry> |
| <entry>默认情况下,TabNavigator 容器仅调整一次大小来适应第一个子容器的大小。这些容器不会在您导航到其他子容器时再次调整大小。若要强制 TabNavigator 容器在您导航到其它子容器后调整大小,请将 resizeToContent 属性设置为 true。</entry> |
| </row><row> |
| <entry>子布局规则</entry> |
| <entry>如果子容器大于 TabNavigator 容器,将对其进行剪裁。如果子容器小于 TabNavigator 容器,则将其与 TabNavigator 容器的左上角对齐。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="TabNavigatorExample.mxml"><swfblock conref="examples/TabNavigatorExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#ViewStack"><linktext>mx.containers.ViewStack</linktext></link><link href="mx.controls.xml#TabBar"><linktext>mx.controls.TabBar</linktext></link></related-links><apiConstructor id="mx.containers:TabNavigator:TabNavigator"><apiName>TabNavigator</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:TabNavigator:getTabAt"><apiName>getTabAt</apiName><shortdesc> |
| 返回位于指定索引处的导航器的 TabBar 控件选项卡。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>位于指定索引处的选项卡。 |
| |
| </apiDesc><apiOperationClassifier>mx.controls:Button</apiOperationClassifier></apiReturn><apiParam><apiItemName>index</apiItemName><apiType value="int"/><apiDesc>导航器的 TabBar 控件中的索引。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 返回位于指定索引处的导航器的 TabBar 控件选项卡。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:TabNavigator:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算此 TabNavigator 容器的默认大小以及最小值和最大值。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算此 TabNavigator 容器的默认大小以及最小值和最大值。有关 <codeph>measure()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.measure()</codeph> 方法。 |
| |
| <p>TabNavigator 容器与 <codeph>ViewStack</codeph> 容器使用的度量逻辑相同,但有两处改动:第一,它增大了 <codeph>measuredHeight</codeph> 和 <codeph>measuredMinHeight</codeph> 属性的值以便适应选项卡。第二,它可以在必要的情况下增大 <codeph>measuredWidth</codeph> 属性的值以确保每个选项卡的宽度至少为 30 个像素。</p> |
| |
| </apiDesc></apiOperationDetail><related-links><link href="" invalidHref="mx.core.xml#UIComponent/measure()"><linktext>mx.core.UIComponent.measure()</linktext></link><link href="mx.containers.xml#ViewStack/measure()"><linktext>mx.containers.ViewStack.measure()</linktext></link></related-links></apiOperation><apiOperation id="mx.containers:TabNavigator:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 通过设置此容器的选项卡及其子容器的位置和大小来响应大小更改。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 通过设置此容器的选项卡及其子容器的位置和大小来响应大小更改。有关 <codeph>updateDisplayList()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.updateDisplayList()</codeph> 方法。 |
| |
| <p>TabNavigator 容器将它的 TabBar 容器置于顶部。将 TabBar 的宽度设置为 TabNavigator 的宽度,并根据 <codeph>tabHeight</codeph> 属性设置其高度。</p> |
| |
| <p>在 TabBar 下,TabNavigator 容器使用与 ViewStack 容器中的相同逻辑来设置自己的子容器的位置和大小。</p> |
| |
| </apiDesc></apiOperationDetail><related-links><link href="" invalidHref="mx.core.xml#UIComponent/updateDisplayList()"><linktext>mx.core.UIComponent.updateDisplayList()</linktext></link></related-links></apiOperation><apiValue id="mx.containers:TabNavigator:protected:tabBar"><apiName>tabBar</apiName><shortdesc> |
| 对此 TabNavigator 中的 TabBar 的引用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueClassifier>mx.controls:TabBar</apiValueClassifier></apiValueDef><apiDesc> |
| 对此 TabNavigator 中的 TabBar 的引用。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:TabNavigator:protected:tabBarStyleFilters:get"><apiName>tabBarStyleFilters</apiName><shortdesc> |
| 从 TabNavigator 传递到 tabBar 的样式集。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Object"/></apiValueDef><apiDesc> |
| 从 TabNavigator 传递到 tabBar 的样式集。 |
| </apiDesc></apiValueDetail><related-links><link href="" invalidHref="mx.styles.StyleProxy.xml"><linktext>mx.styles.StyleProxy</linktext></link></related-links></apiValue></apiClassifier><apiClassifier id="mx.containers:TileDirection"><apiName>TileDirection</apiName><shortdesc> |
| TileDirection 类为 Tile 容器的 direction 属性定义常量值。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc> |
| TileDirection 类为 Tile 容器的 <codeph>direction</codeph> 属性定义常量值。 |
| |
| </apiDesc></apiClassifierDetail><related-links><link href="mx.containers.xml#Tile"><linktext>mx.containers.Tile</linktext></link></related-links><apiValue id="mx.containers:TileDirection:HORIZONTAL"><apiName>HORIZONTAL</apiName><shortdesc> |
| 指定以水平方式布局 Tile 容器的子项;即,从第一行开始。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>horizontal</apiData><apiType value="String"/></apiValueDef><apiDesc> |
| 指定以水平方式布局 Tile 容器的子项;即,从第一行开始。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:TileDirection:VERTICAL"><apiName>VERTICAL</apiName><shortdesc> |
| 指定以垂直方式布局 Tile 容器的子项;即,从第一列开始。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>vertical</apiData><apiType value="String"/></apiValueDef><apiDesc> |
| 指定以垂直方式布局 Tile 容器的子项;即,从第一列开始。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:HBox"><apiName>HBox</apiName><shortdesc> |
| Halo HBox 容器将其子项放在同一水平行中。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="direction"/><Alternative owner="mx.containers:HBox" replacement="spark.components.BorderContainer" since="4.0"> |
| </Alternative><Alternative owner="mx.containers:HBox" replacement="spark.components.HGroup" since="4.0"> |
| </Alternative></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:HBox></code> tag inherits all of the tag |
| attributes of its superclass, except <code>direction</code>, and adds |
| no new tag attributes.</p> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:Box</apiBaseClassifier></apiClassifierDef><apiDesc> |
| Halo HBox 容器将其子项放在同一水平行中。使用 <codeph><mx:HBox></codeph> 标签代替 <codeph><mx:Box></codeph> 标签作为一种快捷方式,以避免必须将 <codeph>direction</codeph> 属性设为 <codeph>"horizontal"</codeph>。 |
| |
| <p><b>注意:</b>如有可能,Adobe 建议您使用具有 HorizontalLayout 的 Spark 容器,而不要使用 Halo HBox 容器。</p> |
| |
| <p>HBox 容器具有下列默认大小特性:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>宽度足以容纳所有子容器(其大小为默认宽度或明确指定的宽度与子容器之间的水平间隙以及该容器的左填充和右填充之和)。高度为最高子容器的默认或明确指定的高度与容器的上下填充之和。 |
| </entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="HBoxExample.mxml"><swfblock conref="examples/HBoxExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.core.xml#Container"><linktext>mx.core.Container</linktext></link><link href="mx.containers.xml#Box"><linktext>mx.containers.Box</linktext></link><link href="mx.containers.xml#VBox"><linktext>mx.containers.VBox</linktext></link></related-links><apiConstructor id="mx.containers:HBox:HBox"><apiName>HBox</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="mx.containers:VBox"><apiName>VBox</apiName><shortdesc> |
| Halo VBox 容器将其子项放在同一垂直列上。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="direction"/><Alternative owner="mx.containers:VBox" replacement="spark.components.BorderContainer" since="4.0"> |
| </Alternative><Alternative owner="mx.containers:VBox" replacement="spark.components.VGroup" since="4.0"> |
| </Alternative></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:VBox></code> tag inherits all of the tag |
| attributes of its superclass, except <code>direction</code>, and adds |
| no new tag attributes.</p></p> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:Box</apiBaseClassifier></apiClassifierDef><apiDesc> |
| Halo VBox 容器将其子项放在同一垂直列上。使用 <codeph><mx:VBox></codeph> 标签(而非 <codeph><mx:Box></codeph> 标签)作为快捷方式可以不必将 <codeph>direction</codeph> 属性设为 <codeph>"vertical"</codeph>。 |
| |
| <p><b>注意:</b>Adobe 建议您,如果可能,请使用具有 VerticalLayout 的 Spark 容器,而不使用 Halo VBox 容器。</p> |
| |
| <p>VBox 容器具有以下默认大小特性:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>高度足以容纳使用默认或明确指定的高度的所有子项、各子项之间的所有垂直间隔,以及容器的上下填充。宽度为最宽的子容器的默认宽度或明确指定的宽度与容器的左填充和右填充之和。 |
| </entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="VBoxExample.mxml"><swfblock conref="examples/VBoxExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.core.xml#Container"><linktext>mx.core.Container</linktext></link><link href="mx.containers.xml#Box"><linktext>mx.containers.Box</linktext></link><link href="mx.containers.xml#HBox"><linktext>mx.containers.HBox</linktext></link></related-links><apiConstructor id="mx.containers:VBox:VBox"><apiName>VBox</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="mx.containers:TitleWindow"><apiName>TitleWindow</apiName><shortdesc> |
| TitleWindow 布局容器为其子项提供了标题栏、标注、边框和内容区域。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Alternative owner="mx.containers:TitleWindow" replacement="spark.components.TitleWindow" since="4.0"> |
| </Alternative><styles><style inherit="no" name="closeButtonUpSkin" owner="mx.containers:TitleWindow" playerVersion="Flash9" type="Class"> |
| <description> |
| 关闭按钮弹起时的外观。默认值为 Assets.swf 文件中的 "CloseButtonUp" 符号。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="closeButtonOverSkin" owner="mx.containers:TitleWindow" playerVersion="Flash9" type="Class"> |
| <description> |
| 经过关闭按钮时的外观。默认值为 Assets.swf 文件中的 "CloseButtonOver" 符号。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="closeButtonDownSkin" owner="mx.containers:TitleWindow" playerVersion="Flash9" type="Class"> |
| <description> |
| 关闭按钮按下时的外观。默认值为 Assets.swf 文件中的 "CloseButtonDown" 符号。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="closeButtonDisabledSkin" owner="mx.containers:TitleWindow" playerVersion="Flash9" type="Class"> |
| <description> |
| 关闭按钮禁用时的外观。默认值为 Assets.swf 文件中的 "CloseButtonDisabled" 符号。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="closeButtonSkin" owner="mx.containers:TitleWindow" playerVersion="Flash9" type="Class"> |
| <description> |
| 关闭按钮的默认外观。 |
| |
| </description> |
| <default>null |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:TitleWindow></code> tag inherits all of the tag |
| attributes of its superclass, and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:TitleWindow |
| <b>Properties</b> |
| showCloseButton="false|true" |
| |
| <b>Styles</b> |
| closeButtonDisabledSkin="<i>'CloseButtonDisabled' symbol in Assets.swf</i>" |
| closeButtonDownSkin="<i>'CloseButtonDown' symbol in Assets.swf</i>" |
| closeButtonOverSkin="<i>'CloseButtonOver' symbol in Assets.swf</i>" |
| closeButtonUpSkin="<i>'CloseButtonUp' symbol in Assets.swf</i>" |
| |
| <strong>Events</strong> |
| close="<i>No default</i>" |
| > |
| ... |
| child tags |
| ... |
| /> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:Panel</apiBaseClassifier></apiClassifierDef><apiDesc> |
| TitleWindow 布局容器为其子项提供了标题栏、标注、边框和内容区域。通常,使用 TitleWindow 容器封装独立的应用程序模块。例如,您可以在 TitleWindow 容器中包含一个表单。当用户完成此表单后,您可以通过编程方式关闭 TitleWindow 容器,或允许用户使用“关闭”按钮将其关闭。 |
| |
| <p>TitleWindow 容器具有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>高度足以容纳以下内容:内容区域中使用默认或明确指定的高度时的所有子项、标题栏和边框、各子项间的垂直间隔,以及容器的顶部和底部填充。宽度大于以下各项之和:最宽子项的默认或明确指定的宽度,以及容器的左右边界填充或标题文本的宽度。</entry> |
| </row><row> |
| <entry>边框</entry> |
| <entry>左侧和右侧的值为 10 像素。顶部值为 2 像素。底部值为 0 像素。 |
| </entry> |
| </row><row> |
| <entry>填充</entry> |
| <entry>上、下、左、右的值均为 4 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="SimpleTitleWindowExample.mxml"/><example conref="TitleWindowApp.mxml"><swfblock conref="examples/TitleWindowApp.swf"/></example></apiClassifierDetail><related-links><link href="mx.core.xml#Application"><linktext>mx.core.Application</linktext></link><link href="" invalidHref="mx.managers.PopUpManager.xml"><linktext>mx.managers.PopUpManager</linktext></link><link href="mx.containers.xml#Panel"><linktext>mx.containers.Panel</linktext></link></related-links><adobeApiEvent id="mx.containers:TitleWindow_mx.events.CloseEvent.CLOSE_close"><apiName>close</apiName><shortdesc> |
| 当用户选择关闭按钮时,分派此方法。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata><asCustoms><helpid>3985 |
| </helpid></asCustoms></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>mx.events.CloseEvent.CLOSE</apiEventType><adobeApiEventClassifier>mx.events.CloseEvent</adobeApiEventClassifier><apiGeneratedEvent/><apiTipTexts><apiTipText>close 事件 |
| |
| </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc> |
| 当用户选择关闭按钮时,分派此方法。 |
| |
| </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="mx.containers:TitleWindow:TitleWindow"><apiName>TitleWindow</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiValue id="mx.containers:TitleWindow:showCloseButton:get"><apiName>showCloseButton</apiName><shortdesc> |
| 是否在 TitleWindow 容器中显示“关闭”按钮。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata><asCustoms><helpid>3986 |
| |
| </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue><apiTipTexts><apiTipText>如果为 true,则显示关闭按钮。 |
| </apiTipText></apiTipTexts></apiValueDef><apiDesc> |
| 是否在 TitleWindow 容器中显示“关闭”按钮。默认值为 <codeph>false</codeph>。将其设置为 <codeph>true</codeph> 可显示“关闭”按钮。选择“关闭”按钮将生成一个 <codeph>close</codeph> 事件,但不会关闭 TitleWindow 容器。必须为此 <codeph>close</codeph> 事件编写一个处理函数,从内部关闭 TitleWindow。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:FormHeading"><apiName>FormHeading</apiName><shortdesc> |
| FormHeading 容器用于显示 Form 容器中一组控件的标题。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Alternative owner="mx.containers:FormHeading" replacement="spark.components.FormHeading" since="4.5"> |
| </Alternative><styles><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 标题文本上方的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="labelWidth" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 表单标签的宽度。默认值为表单中最长标签的长度。对于 FormHeading,<codeph>labelWidth</codeph> 为到标题文本左侧的距离。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="indicatorGap" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 标签区域与标题文本之间的像素数目。 |
| |
| </description> |
| <default>14 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="textIndent" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 文本第一行偏离容器左侧的距离(以像素为单位)。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="textFieldClass" owner="mx.containers:FormHeading" playerVersion="Flash10" type="Class"> |
| <description> |
| 实现此组件用来呈示文本的 IUITextField 的类。 |
| |
| <p>它可以设置为 mx.core.UITextField 类(以使用 Flash Player 内置经典 TextField 类)或 mx.core.UIFTETextField 类(以使用 Text Layout Framework 改进文本呈示,包括双向布局)。</p> |
| |
| </description> |
| <default>mx.core.UITextField |
| |
| </default> |
| |
| <playerversion>AIR 1.5 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 4 |
| </productversion></asCustoms></prolog></style><style enumeration="none,underline" inherit="yes" name="textDecoration" owner="mx.containers:FormHeading" playerVersion="Flash9" type="String"> |
| <description> |
| 确定文本是否加下划线。可能值有:<codeph>"none"</codeph> 和 <codeph>"underline"</codeph>。 |
| |
| </description> |
| <default>"none" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="yes" name="textAlign" owner="mx.containers:FormHeading" playerVersion="Flash9" type="String"> |
| <description> |
| 容器内文本的对齐方式。可能值有:<codeph>"left"</codeph>、<codeph>"right"</codeph> 或 <codeph>"center"</codeph>。 |
| |
| <p>大多数组件的默认值为 <codeph>"left"</codeph>。对于 FormItem 组件,默认值为 <codeph>"right"</codeph>。对于 Button、LinkButton 和 AccordionHeader 组件,默认值为 <codeph>"center"</codeph>,且仅当将 <codeph>labelPlacement</codeph> 属性设置为 <codeph>"left"</codeph> 或 <codeph>"right"</codeph> 时,才能识别此属性。如果将 <codeph>labelPlacement</codeph> 设置为 <codeph>"top"</codeph> 或 <codeph>"bottom"</codeph>,将居中文本及所有图标。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="yes" name="locale" owner="mx.containers:FormHeading" playerVersion="Flash10" type="String"> |
| <description> |
| 此组件显示的文本的区域设置。 |
| |
| <p>FTE 和 TLF 使用此区域设置将 Unicode 字符映射到字体字型并查找后备字体。</p> |
| |
| <p>注意:仅当 MX 组件将 UIFTETextField 指定为其 <codeph>textFieldClass</codeph> 时此样式才适用。</p> |
| |
| </description> |
| <default>"en" |
| |
| </default> |
| |
| <playerversion>AIR 1.5 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 4 |
| </productversion></asCustoms></prolog></style><style inherit="yes" name="letterSpacing" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 各字符之间显示的附加像素数。如果为正值,则会在正常间距的基础上增加字符间距;如果为负值,则减小此间距。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="yes" name="kerning" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Boolean"> |
| <description> |
| 一个布尔值,表示是启用 (<codeph>true</codeph>) 还是禁用 (<codeph>false</codeph>) 字距调整。字距调整会调整某些字符对之间的间隔以提高可读性,并应只在必要时(例如使用大字体标题时)使用。仅嵌入字体支持字距调整。某些字体(如宋体)和等宽字体(如 Courier New)不支持字距调整。 |
| |
| </description> |
| <default>false |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="normal,bold" inherit="yes" name="fontWeight" owner="mx.containers:FormHeading" playerVersion="Flash9" type="String"> |
| <description> |
| 确定文本是否使用粗体。可识别的值为 <codeph>normal</codeph> 和 <codeph>bold</codeph>。Button 控件的默认值为 <codeph>bold</codeph>。所有其它控件的默认值为 <codeph>normal</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="yes" name="fontThickness" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 设置用于表示 Flex 控件文本的内部 TextField 的 <codeph>thickness</codeph> 属性。此属性指定字型边缘的粗细。可能值为从 -200 到 200 之间的数字。 |
| |
| <p>仅当使用嵌入字体并将 <codeph>fontAntiAliasType</codeph> 属性设置为 <codeph>"advanced"</codeph> 时,才应用此属性。</p> |
| |
| <p>此样式对系统字体不起作用。</p> |
| |
| <p>此样式适用于 TextField 子控件中的所有文本;但不适用于部分字符。</p> |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog><related-links><link href="" invalidHref="flash.text.TextField.xml"><linktext>flash.text.TextField</linktext></link></related-links></style><style enumeration="normal,italic" inherit="yes" name="fontStyle" owner="mx.containers:FormHeading" playerVersion="Flash9" type="String"> |
| <description> |
| 确定文本是否使用斜体。可识别的值为 <codeph>"normal"</codeph> 和 <codeph>"italic"</codeph>。 |
| |
| </description> |
| <default>"normal" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="fontSize" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 文本的高度,以像素为单位。在 Halo 主题中,除 ColorPicker 控件外,所有其它控件的默认值均为 10。对于 Halo 主题的 ColorPicker 控件,默认值为 11。在 Spark 主题中,除 ColorPicker 控件外,所有其它控件的默认值均为 12。对于 Spark 主题的 ColorPicker 控件,默认值为 11。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="yes" name="fontSharpness" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 设置用于表示 Flex 控件文本的内部 TextField 的 <codeph>sharpness</codeph> 属性。此属性指定字型边缘的清晰度。可能值为从 -400 到 400 之间的数字。 |
| |
| <p>仅当使用嵌入字体并将 <codeph>fontAntiAliasType</codeph> 属性设置为 <codeph>"advanced"</codeph> 时,才应用此属性。</p> |
| |
| <p>此样式对系统字体不起作用。</p> |
| |
| <p>此样式适用于 TextField 子控件中的所有文本;但不适用于部分字符。</p> |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog><related-links><link href="" invalidHref="flash.text.TextField.xml"><linktext>flash.text.TextField</linktext></link></related-links></style><style enumeration="none,pixel,subpixel" inherit="yes" name="fontGridFitType" owner="mx.containers:FormHeading" playerVersion="Flash9" type="String"> |
| <description> |
| 设置用于表示 Flex 控件文本的内部 TextField 的 <codeph>gridFitType</codeph> 属性。可能值为 <codeph>"none"</codeph> (<codeph>flash.text.GridFitType.NONE</codeph>)、<codeph>"pixel"</codeph> (<codeph>flash.text.GridFitType.PIXEL</codeph>) 和<codeph>"subpixel"</codeph> (<codeph>flash.text.GridFitType.SUBPIXEL</codeph>)。 |
| |
| <p>仅当使用嵌入字体并将 <codeph>fontAntiAliasType</codeph> 属性设置为 <codeph>"advanced"</codeph> 时,才应用此属性。</p> |
| |
| <p>此样式对系统字体不起作用。</p> |
| |
| <p>此样式适用于 TextField 子控件中的所有文本;但不适用于部分字符。</p> |
| |
| </description> |
| <default>"pixel" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| |
| <see>flash.text.GridFitType |
| |
| </see> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog><related-links><link href="" invalidHref="flash.text.TextField.xml"><linktext>flash.text.TextField</linktext></link><link href="" invalidHref="flash.text.GridFitType.xml"><linktext>flash.text.GridFitType</linktext></link></related-links></style><style inherit="yes" name="fontFamily" owner="mx.containers:FormHeading" playerVersion="Flash9" type="String"> |
| <description> |
| 使用的字体的名称。与在完全 CSS 实现中不同,这里不支持逗号分隔的列表。您可以使用任何字体系列名称。如果您指定通用字体名称,它将转换为相应的设备字体。Halo 主题的默认字体为 <codeph>"Verdana"</codeph>。Spark 主题的默认字体为 <codeph>"Arial"</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="normal,advanced" inherit="yes" name="fontAntiAliasType" owner="mx.containers:FormHeading" playerVersion="Flash9" type="String"> |
| <description> |
| 设置内部 TextField 的 <codeph>antiAliasType</codeph> 属性。可能值为 <codeph>"normal"</codeph> (<codeph>flash.text.AntiAliasType.NORMAL</codeph>) 和 <codeph>"advanced"</codeph> (<codeph>flash.text.AntiAliasType.ADVANCED</codeph>)。 |
| |
| <p>默认值为 <codeph>"advanced"</codeph>,该值将启用字体的高级消除锯齿功能。设置为 <codeph>"normal"</codeph> 可禁用高级消除锯齿功能。</p> |
| |
| <p>此样式对系统字体不起作用。</p> |
| |
| <p>此样式适用于 TextField 子控件中的所有文本;但不能将其应用于部分字符。</p> |
| |
| </description> |
| <default>"advanced" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| |
| <see>flash.text.AntiAliasType |
| |
| </see> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog><related-links><link href="" invalidHref="flash.text.TextField.xml"><linktext>flash.text.TextField</linktext></link><link href="" invalidHref="flash.text.AntiAliasType.xml"><linktext>flash.text.AntiAliasType</linktext></link></related-links></style><style format="Color" inherit="yes" name="disabledColor" owner="mx.containers:FormHeading" playerVersion="Flash9" type="uint"> |
| <description> |
| 禁用时组件中文本的颜色。 |
| |
| </description> |
| <default>0xAAB3B3 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="ltr,rtl,inherit" inherit="yes" name="direction" owner="mx.containers:FormHeading" playerVersion="Flash10" type="String"> |
| <description> |
| 此组件显示的文本的方向性。 |
| |
| <p>允许的值为<codeph>“ltr”</codeph>(适用于从左到右文本,就像在拉丁样式脚本中一样)和<codeph>“rtl”</codeph>(适用于从右到左文本,就像在阿拉伯语和希伯来语中一样)。</p> |
| |
| <p>FTE 和 TLF 在其双向文本布局算法中使用此值,该算法会将 Unicode 字符顺序映射到字型顺序。</p> |
| |
| <p>注意:仅当 MX 组件将 UIFTETextField 指定为其 <codeph>textFieldClass</codeph> 时此样式才适用。</p> |
| |
| <p><codeph>direction</codeph> 还影响在 TLFTextField 的范围内的文本的对齐。但是,它不会影响组件内 TLFTextField 的位置。</p> |
| |
| </description> |
| <default>"ltr" |
| |
| </default> |
| |
| <playerversion>AIR 1.5 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 4 |
| </productversion></asCustoms></prolog></style><style format="Color" inherit="yes" name="color" owner="mx.containers:FormHeading" playerVersion="Flash9" type="uint"> |
| <description> |
| 组件中文本(包括组件标签)的颜色。Halo 主题的默认值为 <codeph>0x0B333C</codeph>。Spark 主题的默认值为 <codeph>0x000000</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingRight" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 组件右边框与其内容区域右边缘之间的像素数目。 |
| <p>默认值为 0。</p> |
| <p>在 Halo 主题中,Button 控件的默认值为 10,在 Spark 主题中,其默认值为 6。</p> |
| <p>ComboBox 控件的默认值为 5。</p> |
| <p>Form 容器的默认值为 16。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingLeft" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 组件左边框与其内容区域左边缘之间的像素数目。 |
| <p>默认值为 0。</p> |
| <p>在 Halo 主题中,Button 控件的默认值为 10,在 Spark 主题中,其默认值为 6。</p> |
| <p>ComboBox 控件的默认值为 5。</p> |
| <p>Form 容器的默认值为 16。</p> |
| <p>Tree 控件的默认值为 2。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="leading" owner="mx.containers:FormHeading" playerVersion="Flash9" type="Number"> |
| <description> |
| 文本行之间附加的垂直空间。 |
| |
| <p>默认值为 2。</p> |
| <p>ComboBox 控件的默认值为 0。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:FormHeading></code> tag inherits all of the tag |
| attributes of its superclass and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:FormHeading |
| <strong>Properties</strong> |
| label="" |
| |
| <strong>Styles</strong> |
| color="0x0B333C" |
| disabledColor="0xAAB3B3" |
| fontAntiAliasType="advanced|normal" |
| fontFamily="Verdana" |
| fontGridFitType="pixel|subpixel|none" |
| fontSharpness="0" |
| fontSize="12" |
| fontStyle="normal|italic" |
| fontThickness="0" |
| fontWeight="normal|bold" |
| indicatorGap="14" |
| labelWidth="<i>Calculated</i>" |
| leading="2" |
| paddingLeft="0" |
| paddingRight="0" |
| paddingTop="0" |
| textAlign="<i>Calculated</i>" |
| textDecoration="none|underline" |
| textIndent="0" |
| /> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.core:UIComponent</apiBaseClassifier></apiClassifierDef><apiDesc> |
| FormHeading 容器用于显示 Form 容器中一组控件的标题。将标题的左侧与表单中控件的左侧对齐。您可以在单个 Form 容器中包含多个 FormHeading 容器。 |
| |
| </apiDesc><example conref="FormExample.mxml"><swfblock conref="examples/FormExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#Form"><linktext>mx.containers.Form</linktext></link><link href="mx.containers.xml#FormItem"><linktext>mx.containers.FormItem</linktext></link></related-links><apiConstructor id="mx.containers:FormHeading:FormHeading"><apiName>FormHeading</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiValue id="mx.containers:FormHeading:label:get"><apiName>label</apiName><shortdesc> |
| 表单标题文本。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="labelChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/></apiValueDef><apiDesc> |
| 表单标题文本。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:Accordion"><apiName>Accordion</apiName><shortdesc> |
| MX Accordion 导航器容器具有一组子 MX 容器或 Spark NavigatorContent 容器,但一次只能显示其中一个。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="verticalScrollBarStyleName"/><Exclude kind="style" name="horizontalScrollBarStyleName"/><Exclude kind="event" name="scroll"/><Exclude kind="property" name="verticalScrollPosition"/><Exclude kind="property" name="verticalScrollPolicy"/><Exclude kind="property" name="verticalScrollBar"/><Exclude kind="property" name="verticalPageScrollSize"/><Exclude kind="property" name="verticalLineScrollSize"/><Exclude kind="property" name="maxVerticalScrollPosition"/><Exclude kind="property" name="maxHorizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPolicy"/><Exclude kind="property" name="horizontalScrollBar"/><Exclude kind="property" name="horizontalPageScrollSize"/><Exclude kind="property" name="horizontalLineScrollSize"/><Exclude kind="property" name="defaultButton"/><Exclude kind="property" name="clipContent"/><Exclude kind="property" name="autoLayout"/><styles><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:Accordion" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。默认值是 -1,此时相邻标题的上下边框重叠。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Color" inherit="yes" name="textSelectedColor" owner="mx.containers:Accordion" playerVersion="Flash9" type="uint"> |
| <description> |
| 所选文本的颜色。Halo 主题的默认值为 <codeph>0x2B333C</codeph>。Spark 主题的默认值为 <codeph>0x000000</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Color" inherit="yes" name="textRollOverColor" owner="mx.containers:Accordion" playerVersion="Flash9" type="uint"> |
| <description> |
| 鼠标移到标题文本上时,该标题文本的颜色。Halo 主题的默认值为 <codeph>0x2B333C</codeph>。Spark 主题的默认值为 <codeph>0x000000</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:Accordion" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的上边框与其内容区域之间的像素数目。默认值为 -1,此时第一个标题的上边框与 Accordion 容器的上边框重叠。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingBottom" owner="mx.containers:Accordion" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的下边框与其内容区域之间的像素数目。默认值为 -1,此时最后一个标题的下边框与 Accordion 容器的下边框重叠。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="openEasingFunction" owner="mx.containers:Accordion" playerVersion="Flash9" type="Function"> |
| <description> |
| 由动画应用于各个子项的补间函数。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Time" inherit="no" name="openDuration" owner="mx.containers:Accordion" playerVersion="Flash9" type="Number"> |
| <description> |
| 动画从一个子项到另一个子项的持续时间,以毫秒为单位。Halo 主题的默认值为 250。Spark 主题的默认值为 0。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="headerHeight" owner="mx.containers:Accordion" playerVersion="Flash9" type="Number"> |
| <description> |
| 每个 Accordion 标题的高度,以像素为单位。默认值根据标题的字体样式自动计算得出。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:Accordion" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。默认值为 8。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="headerStyleName" owner="mx.containers:Accordion" playerVersion="Flash9" type="String"> |
| <description> |
| 用于指定 Accordion 标题(选项卡)样式的 CSS 样式声明的名称。 |
| |
| <p>您可以使用此类选择器设置 AccordionHeader 类的所有样式属性的值,包括 <codeph>fillAlphas</codeph>、<codeph>fillColors</codeph>、<codeph>focusAlpha</codeph>、<codeph>focusRounderCorners</codeph>、<codeph>focusSkin</codeph>、<codeph>focusThickness</codeph> 和 <codeph>selectedFillColors</codeph>。</p> |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:Accordion></code> tag inherits all of the |
| tag attributes of its superclass, with the exception of scrolling-related |
| attributes, and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:Accordion |
| <strong>Properties</strong> |
| headerRenderer="<i>IFactory</i>" |
| historyManagementEnabled="true|false" |
| resizeToContent="false|true" |
| selectedChild"<i>A reference to the first child</i>" |
| selectedIndex="undefined" |
| |
| <strong>Styles</strong> |
| headerHeight="depends on header font styles" |
| headerStyleName="<i>No default</i>" |
| horizontalGap="8" |
| openDuration="250" |
| openEasingFunction="undefined" |
| paddingBottom="-1" |
| paddingTop="-1" |
| textRollOverColor="0xB333C" |
| textSelectedColor="0xB333C" |
| verticalGap="-1" |
| |
| <strong>Events</strong> |
| change="<i>No default</i>" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:Accordion> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiTipTexts><apiTipText>Accordion 允许在不同的子视图之间导航 |
| </apiTipText></apiTipTexts><apiBaseInterface>mx.managers:IHistoryManagerClient</apiBaseInterface><apiBaseInterface>mx.managers:IFocusManagerComponent</apiBaseInterface><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| MX Accordion 导航器容器具有一组子 MX 容器或 Spark NavigatorContent 容器,但一次只能显示其中一个。它创建和管理导航器按钮(Accordion 标题),您可以使用这些按钮在子代之间导航。每个子容器都有一个相关的导航器按钮,但是所有导航器按钮都属于 Accordion 容器,并不属于子代。当用户单击导航器按钮时,就会显示相关的子容器。到另一个子项的过渡过程将使用动画效果,这样用户就可以清楚地看到一个子项消失和另一个子项的出现。 |
| |
| <p><b>注意:</b>MX 导航器容器的直接子容器必须为 MX 容器(MX 布局或 MX 导航器容器)或者 Spark NavigatorContent 容器。您不能直接在某一导航器中嵌套控件或除 Spark NavigatorContent 容器之外的 Spark 容器;它们必须是子 MX 容器的子容器。</p> |
| |
| <p>Accordion 容器不扩展 ViewStack 容器,但实现 ViewStack 容器的所有属性、方法、样式和事件,如 <codeph>selectedIndex</codeph> 和 <codeph>selectedChild</codeph>。</p> |
| |
| <p>Accordion 容器具有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>当前活动子项的宽度和高度。</entry> |
| </row><row> |
| <entry>容器大小调整规则</entry> |
| <entry>默认情况下,Accordion 容器只调整一次大小,以适应第一个子容器的大小。默认情况下,当导航到其他子项容器时,不会调整 Accordion 容器的大小。要在导航到其他子容器时强制调整 Accordion 容器的大小,请将 resizeToContent 属性设置为 true。</entry> |
| </row><row> |
| <entry>子项大小调整规则</entry> |
| <entry>子项均设置为各自的默认大小。如果子项比 Accordion 容器大,将裁剪子项。如果子项比 Accordion 容器小,子项将与 Accordion 容器的左上角对齐。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>top、bottom、left 和 right 的值均为 -1 个像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="AccordionExample.mxml"><swfblock conref="examples/AccordionExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.accordionClasses.xml#AccordionHeader"><linktext>mx.containers.accordionClasses.AccordionHeader</linktext></link></related-links><adobeApiEvent id="mx.containers:Accordion_mx.events.IndexChangedEvent.CHANGE_change"><apiName>change</apiName><shortdesc> |
| 当所选的子容器更改时分派此方法。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata><asCustoms><helpid>3012 |
| </helpid></asCustoms></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>mx.events.IndexChangedEvent.CHANGE</apiEventType><adobeApiEventClassifier>mx.events.IndexChangedEvent</adobeApiEventClassifier><apiGeneratedEvent/><apiTipTexts><apiTipText>change 事件 |
| |
| </apiTipText></apiTipTexts></adobeApiEventDef><apiDesc> |
| 当所选的子容器更改时分派此方法。 |
| |
| </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="mx.containers:Accordion:Accordion"><apiName>Accordion</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:Accordion:getHeaderAt"><apiName>getHeaderAt</apiName><shortdesc> |
| 返回对某个子容器的导航器按钮的引用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>代表导航器按钮的 Button 对象。 |
| |
| </apiDesc><apiOperationClassifier>mx.controls:Button</apiOperationClassifier></apiReturn><apiParam><apiItemName>index</apiItemName><apiType value="int"/><apiDesc>子项的从零开始的索引。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 返回对某个子容器的导航器按钮的引用。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Accordion:loadState"><apiName>loadState</apiName><shortdesc conref="mx.managers.IHistoryManagerClient#loadState()"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>state</apiItemName><apiType value="Object"/></apiParam></apiOperationDef><apiDesc conref="mx.managers.IHistoryManagerClient#loadState()"> |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Accordion:saveState"><apiName>saveState</apiName><shortdesc conref="mx.managers.IHistoryManagerClient#saveState()"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="Object"/></apiReturn></apiOperationDef><apiDesc conref="mx.managers.IHistoryManagerClient#saveState()"> |
| </apiDesc></apiOperationDetail></apiOperation><apiValue id="mx.containers:Accordion:protected:contentHeight:get"><apiName>contentHeight</apiName><shortdesc> |
| 显示内容的区域的高度,以像素为单位。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Number"/></apiValueDef><apiDesc> |
| 显示内容的区域的高度,以像素为单位。如果内容未占据容器的整个区域,则可以覆盖此 getter。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Accordion:protected:contentWidth:get"><apiName>contentWidth</apiName><shortdesc> |
| 显示内容的区域的宽度,以像素为单位。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Number"/></apiValueDef><apiDesc> |
| 显示内容的区域的宽度,以像素为单位。如果内容未占据容器的整个区域,则可以覆盖此 getter。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Accordion:headerRenderer:get"><apiName>headerRenderer</apiName><shortdesc> |
| 用于为每个子项创建导航按钮的类工厂。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="headerRendererChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="mx.core:IFactory"/></apiValueDef><apiDesc> |
| 用于为每个子项创建导航按钮的类工厂。默认值为创建 <codeph>mx.containers.accordionClasses.AccordionHeader</codeph> 的类工厂。创建的对象必须是 Button 的子类,并且必须实现 <codeph>mx.core.IDataRenderer</codeph> 接口。<codeph>data</codeph> 属性设置为与标题相关的内容。 |
| |
| </apiDesc></apiValueDetail><related-links><link href="mx.containers.accordionClasses.xml#AccordionHeader"><linktext>mx.containers.accordionClasses.AccordionHeader</linktext></link></related-links></apiValue><apiValue id="mx.containers:Accordion:historyManagementEnabled:get"><apiName>historyManagementEnabled</apiName><shortdesc> |
| 如果设置为 true,则此属性会在此 Accordion 容器内启用历史记录管理。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>true |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果设置为 <codeph>true</codeph>,则此属性会在此 Accordion 容器内启用历史记录管理。当用户从一个子项导航到另一个子项时,浏览器将记录访问过的子项。然后,用户可以单击浏览器的“后退”和“前进”按钮浏览此导航历史记录。 |
| |
| </apiDesc></apiValueDetail><related-links><link href="" invalidHref="mx.managers.HistoryManager.xml"><linktext>mx.managers.HistoryManager</linktext></link></related-links></apiValue><apiValue id="mx.containers:Accordion:resizeToContent:get"><apiName>resizeToContent</apiName><shortdesc> |
| 如果设置为 true,则此 Accordion 将自动调整为其当前子项的大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果设置为 <codeph>true</codeph>,则此 Accordion 将自动调整为其当前子项的大小。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Accordion:selectedChild:get"><apiName>selectedChild</apiName><shortdesc> |
| 对当前可见子容器的引用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata><asCustoms><helpid>3401 |
| |
| </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="valueCommit"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="mx.core:INavigatorContent"/><apiTipTexts><apiTipText>指定当前显示的子视图。 |
| </apiTipText></apiTipTexts></apiValueDef><apiDesc> |
| 对当前可见子容器的引用。默认值为对第一个子项的引用。如果没有子项,则此属性为 <codeph>null</codeph>。 |
| |
| <p><b>注意:</b>您只能在 ActionScript 语句中设置此属性,而不能在 MXML 中进行设置。</p> |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Accordion:selectedIndex:get"><apiName>selectedIndex</apiName><shortdesc> |
| 当前可见子容器的从零开始的索引。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata><asCustoms><helpid>3402 |
| |
| </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="valueCommit"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="int"/><apiDefaultValue>0 |
| |
| </apiDefaultValue><apiTipTexts><apiTipText>指定当前显示的子视图的索引。 |
| </apiTipText></apiTipTexts></apiValueDef><apiDesc> |
| 当前可见子容器的从零开始的索引。子索引的范围是 0、1、2、...、n - 1,其中 n 是子项的数目。默认值是 0,对应于第一个子项。如果没有子项,则此属性为 <codeph>-1</codeph>。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:ControlBar"><apiName>ControlBar</apiName><shortdesc> |
| 使用 ControlBar 容器可以将控件放置在 Halo Panel 或 Halo TitleWindow 容器的底部。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="shadowDistance"/><Exclude kind="style" name="shadowDirection"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="style" name="dropShadowEnabled"/><Exclude kind="style" name="dropShadowColor"/><Exclude kind="style" name="borderThickness"/><Exclude kind="style" name="borderSides"/><Exclude kind="style" name="borderColor"/><Exclude kind="style" name="backgroundColor"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="verticalScrollPolicy"/><Exclude kind="property" name="horizontalScrollPolicy"/><Exclude kind="property" name="direction"/><Alternative owner="mx.containers:ControlBar" replacement="none" since="4.0"> |
| <description> |
| 自 Flex 4 起,不再需要 ControlBar 组件。使用 Spark Panel 类的 <codeph>controlBarContent</codeph> 属性来指定要包含在控件栏区域中的组件集。使用 Spark Panel 类的 <codeph>controlBarLayout</codeph> 属性来指定控件栏区域的布局。 |
| </description> |
| </Alternative></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:ControlBar></code> tag inherits all the tag |
| attributes but adds no additional attributes:</p> |
| |
| <pre> |
| <mx:ControlBar> |
| ... |
| <i>child tags</i> |
| ... |
| </mx:ControlBar> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:Box</apiBaseClassifier></apiClassifierDef><apiDesc> |
| 使用 ControlBar 容器可以将控件放置在 Halo Panel 或 Halo TitleWindow 容器的底部。<codeph><mx:ControlBar></codeph> 标记必须是 Halo Panel 或 Halo TitleWindow 容器的闭合标记的最后一个子标记。 |
| |
| <p><b>注意:</b>Spark Panel 容器不支持 ControlBar 容器。请修改 Spark Panel 容器的外观以添加此功能。</p> |
| |
| <p>ControlBar 是一个具有背景和默认样式属性的框。</p> |
| |
| <p>ControlBar 容器有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>高度为最高子项的默认高度或明确指定的高度与容器的上下填充之和。宽度足以容纳使用默认宽度或明确指定的宽度时的所有子项、子项间的任何水平间距,以及容器的左右填充。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 10 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="SimpleControlBarExample.mxml"><swfblock conref="examples/SimpleControlBarExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#Panel"><linktext>mx.containers.Panel</linktext></link></related-links><apiConstructor id="mx.containers:ControlBar:ControlBar"><apiName>ControlBar</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="mx.containers:GridItem"><apiName>GridItem</apiName><shortdesc> |
| GridItem 容器在 GridRow 容器中定义网格单元格。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="moveEffect"/><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="verticalGap"/><Exclude kind="style" name="horizontalGap"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="move"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="method" name="setFocus"/><Exclude kind="method" name="isOurFocus"/><Exclude kind="method" name="getFocus"/><Exclude kind="method" name="adjustFocusRect"/><Exclude kind="property" name="mouseFocusEnabled"/><Exclude kind="property" name="focusPane"/><Exclude kind="property" name="focusManager"/><Exclude kind="property" name="focusEnabled"/><Exclude kind="property" name="direction"/></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:GridItem></code> tag must be a child of the |
| <code><GridRow></code> tag, which defines a grid row. |
| The <code><mx:GridItem></code> container inherits the |
| tag attributes of its superclass, and adds the following tag attributes.</p> |
| |
| <pre> |
| <mx:Grid> |
| <mx:GridRow> |
| <mx:GridItem |
| rowSpan="1" |
| colSpan="1"> |
| <i>child components</i> |
| </mx:GridItem> |
| ... |
| </mx:GridRow> |
| ... |
| </mx:Grid> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:HBox</apiBaseClassifier></apiClassifierDef><apiDesc> |
| GridItem 容器在 GridRow 容器中定义网格单元格。(然后,GridRow 容器在 Grid 容器中定义行。)GridItem 容器可包含任意数量的子项,这些子项的布局方式与 HBox 容器相同。如果您不想使用 HBox 布局,则可创建一个容器(如 VBox 容器)作为 GridItem 控件的子项,然后将其他组件放置在此子容器中。 |
| |
| <p>GridItem 容器有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>每行以及每个单元格的高度</entry> |
| <entry>默认值或行中最高项目的显式高度。如果 GridItem 容器未设定显式大小,则其默认高度为单元格中子项的默认或显式高度。</entry> |
| </row><row> |
| <entry>每列以及每个单元格的宽度</entry> |
| <entry>默认值或列中最宽项目的显式宽度。如果 GridItem 容器没有设置明确指定的宽度值,则使用单元格中子项的默认宽度或明确指定的宽度作为默认值。</entry> |
| </row><row> |
| <entry>行与列的间距</entry> |
| <entry>由 Grid 类的 horizontalGap 和 verticalGap 属性确定。这两个间距的默认值是 6 个像素。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>所有三个容器类的 top、bottom、left 和 right 值均为 0 个像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="GridLayoutExample.mxml"><swfblock conref="examples/GridLayoutExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#Grid"><linktext>mx.containers.Grid</linktext></link><link href="mx.containers.xml#GridRow"><linktext>mx.containers.GridRow</linktext></link></related-links><apiConstructor id="mx.containers:GridItem:GridItem"><apiName>GridItem</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiValue id="mx.containers:GridItem:colSpan:get"><apiName>colSpan</apiName><shortdesc> |
| 包含采用单元格测量的 Grid 容器的列数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="int"/><apiDefaultValue>1 |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 包含采用单元格测量的 Grid 容器的列数。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:GridItem:rowSpan:get"><apiName>rowSpan</apiName><shortdesc> |
| 包含采用单元格测量的 Grid 容器的行数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="int"/><apiDefaultValue>1 |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 包含采用单元格测量的 Grid 容器的行数。您无法在 Grid 中超出行数扩展单元格。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:Panel"><apiName>Panel</apiName><shortdesc> |
| Halo Panel 容器包括标题栏、标题、边框及其子项的内容区域。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Alternative owner="mx.containers:Panel" replacement="spark.components.Panel" since="4.0"> |
| </Alternative><effects><effect event="resizeStart" name="resizeStartEffect" owner="mx.containers:Panel"> |
| <description> |
| 指定在开始播放调整大小效果之前要播放的效果。要禁用默认的溶解效果,以便即时隐藏子项,请将 <codeph>resizeStartEffect</codeph> 属性的值设置为 <codeph>"none"</codeph>。 |
| |
| </description> |
| <default>"Dissolve" |
| |
| </default> |
| <playerversion>Flash 9 |
| </playerversion> |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></effect><effect event="resizeEnd" name="resizeEndEffect" owner="mx.containers:Panel"> |
| <description> |
| 指定在播放调整大小效果结束之后要播放的效果。要禁用默认的溶解效果,以便即时隐藏子项,请将 <codeph>resizeEndEffect</codeph> 属性的值设置为 <codeph>"none"</codeph>。 |
| |
| </description> |
| <default>"Dissolve" |
| |
| </default> |
| <playerversion>Flash 9 |
| </playerversion> |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></effect></effects><styles><style inherit="no" name="titleStyleName" owner="mx.containers:Panel" playerVersion="Flash9" type="String"> |
| <description> |
| 标题栏中文本的样式声明名称。默认值为 <codeph>"windowStyles"</codeph>,该值将导致标题包含粗体文本。 |
| |
| </description> |
| <default>"windowStyles" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="titleBackgroundSkin" owner="mx.containers:Panel" playerVersion="Flash9" type="Class"> |
| <description> |
| 标题背景外观。Halo 主题的默认值为 <codeph>mx.skins.halo.TitleBackground</codeph>。Spark 主题的默认值为 <codeph>mx.core.UIComponent</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="statusStyleName" owner="mx.containers:Panel" playerVersion="Flash9" type="String"> |
| <description> |
| 标题栏中状态的样式声明名称。 |
| |
| </description> |
| <default>"windowStatus" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="shadowDistance" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Number"> |
| <description> |
| 投影距离。负值会使阴影移动到面板上。 |
| |
| </description> |
| <default>2 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="no" name="shadowDirection" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="String"> |
| <description> |
| 投影方向。可能值包括 <codeph>"left"</codeph>、<codeph>"center"</codeph> 和 <codeph>"right"</codeph>。 |
| |
| </description> |
| <default>"center" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="roundedBottomCorners" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Boolean"> |
| <description> |
| 为容器的两个底角启用圆化效果的标志。不会影响两个顶角,两个顶角通常为圆角。要将顶角配置为直角,请将 <codeph>cornerRadius</codeph> 设置为 0。 |
| |
| </description> |
| <default>false |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的上边框与其内容区域之间的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingBottom" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的下边框与其内容区域之间的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style arrayType="Number" inherit="no" name="highlightAlphas" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Array"> |
| <description> |
| 用于加亮表头填充的 Alphas。 |
| |
| </description> |
| <default>[0.3,0] |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="headerHeight" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 表头的高度。默认值基于标题文本的样式。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style arrayType="uint" format="Color" inherit="yes" name="headerColors" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Array"> |
| <description> |
| 用于绘制表头的两种颜色的数组。第一种颜色是顶层颜色。第二种颜色是底层颜色。默认值为 <codeph>null</codeph>,该值会使表头背景与面板背景相同。 |
| |
| </description> |
| <default>null |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style arrayType="uint" format="Color" inherit="yes" name="footerColors" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Array"> |
| <description> |
| 用于绘制表尾(ControlBar 容器区域)背景的两种颜色的数组。第一种颜色是顶层颜色。第二种颜色是底层颜色。默认的值为 <codeph>null</codeph>,该值会使控件栏背景与面板背景相同。 |
| |
| </description> |
| <default>null |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="dropShadowEnabled" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Boolean"> |
| <description> |
| 控制 Panel 容器投影可见性的布尔值属性。 |
| |
| </description> |
| <default>true |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="cornerRadius" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo, spark" type="Number"> |
| <description> |
| 窗口框架各角的半径。Halo 主题的默认值为 <codeph>4</codeph>。Spark 主题的默认值为 <codeph>0</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="controlBarStyleName" owner="mx.containers:Panel" playerVersion="Flash9" type="String"> |
| <description> |
| 指定应用于任何控件栏子控件样式的 CSS 样式声明的名称。 |
| |
| </description> |
| <default>null |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="borderThicknessTop" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Number"> |
| <description> |
| Panel 上边框的粗细。 |
| |
| </description> |
| <default>2 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="borderThicknessRight" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Number"> |
| <description> |
| Panel 右边框的粗细。 |
| |
| </description> |
| <default>10 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="borderThicknessLeft" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Number"> |
| <description> |
| Panel 左边框的粗细。 |
| |
| </description> |
| <default>10 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="borderThicknessBottom" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo" type="Number"> |
| <description> |
| Panel 控件下边框的粗细。如果未设置此样式且 Panel 控件包含 ControlBar 控件,则下边框的粗细等于面板上边框的粗细;否则下边框的粗细等于左边框的粗细。 |
| |
| </description> |
| <default>NaN |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="borderAlpha" owner="mx.containers:Panel" playerVersion="Flash9" theme="halo, spark" type="Number"> |
| <description> |
| 标题栏、控件栏和 Panel 各侧的 Alpha。Halo 主题的默认值为 <codeph>0.4</codeph>。Spark 主题的默认值为 <codeph>0.5</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Time" inherit="yes" name="modalTransparencyDuration" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 模式窗口打开或关闭时播放模式透明度效果的持续时间(以毫秒为单位)。 |
| |
| </description> |
| <default>100 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Color" inherit="yes" name="modalTransparencyColor" owner="mx.containers:Panel" playerVersion="Flash9" type="uint"> |
| <description> |
| 模式叠加层的颜色。此样式与 <codeph>modalTransparency</codeph> 样式结合使用,以确定模式窗口打开时应用于应用程序的色彩效果。 |
| |
| </description> |
| <default>#DDDDDD |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="yes" name="modalTransparencyBlur" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 模式窗口打开时,应用于应用程序的模糊效果。模糊效果可以柔化图像的细节。 |
| |
| </description> |
| <default>3 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog><related-links><link href="" invalidHref="flash.filters.BlurFilter.xml"><linktext>flash.filters.BlurFilter</linktext></link></related-links></style><style inherit="yes" name="modalTransparency" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 通过在组件下创建大型半透明叠加层来模拟 PopUp Manager 启动的组件形式。由于半透明对象的呈示方式,您可能会注意到叠加层下的对象略显暗淡。通过将 <codeph>modalTransparency</codeph> 更改为从 0.0(完全透明)到 1.0(完全不透明)之间的值可以设置有效透明度。还可以通过更改 <codeph>modalTransparencyColor</codeph> 样式来设置叠加层的颜色。 |
| |
| </description> |
| <default>0.5 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 6。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:Panel" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 8。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="bottom,middle,top" inherit="no" name="verticalAlign" owner="mx.containers:Panel" playerVersion="Flash9" type="String"> |
| <description> |
| 垂直对齐容器中的子项。可能值包括 <codeph>"top"</codeph>、<codeph>"middle"</codeph> 和 <codeph>"bottom"</codeph>。默认值为 <codeph>"top"</codeph>,但某些容器(如 ButtonBar、ControlBar、LinkBar 和 ToggleButtonBar)具有不同的默认值。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="no" name="horizontalAlign" owner="mx.containers:Panel" playerVersion="Flash9" type="String"> |
| <description> |
| 水平对齐容器中的子容器。可能值包括 <codeph>"left"</codeph>、<codeph>"center"</codeph> 和 <codeph>"right"</codeph>。默认值为 <codeph>"left"</codeph>,但某些容器(如 ButtonBar 和 ToggleButtonBar)具有不同的默认值。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:Panel></code> tag inherits all of the tag |
| attributes of its superclass and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:Panel |
| <strong>Properties</strong> |
| layout="vertical|horizontal|absolute" |
| status="" |
| title="" |
| titleIcon="null" |
| |
| <strong>Styles</strong> |
| borderAlpha="0.4" |
| borderThicknessBottom="NaN" |
| borderThicknessLeft="10" |
| borderThicknessRight="10" |
| borderThicknessTop="2" |
| controlBarStyleName="null" |
| cornerRadius="4" |
| dropShadowEnabled="true|false" |
| footerColors="null" |
| headerColors="null" |
| headerHeight="<i>Based on style of title</i>" |
| highlightAlphas="[0.3,0]" |
| horizontalAlign="left|center|right" |
| horizontalGap="8" |
| modalTransparency="0.5" |
| modalTransparencyBlur="3" |
| modalTransparencyColor="#DDDDDD" |
| modalTransparencyDuration="100" |
| paddingBottom="0" |
| paddingTop="0" |
| roundedBottomCorners="false|true" |
| shadowDirection="center|left|right" |
| shadowDistance="2" |
| statusStyleName="windowStatus" |
| titleBackgroundSkin="TitleBackground" |
| titleStyleName="windowStyles" |
| verticalAlign="top|middle|bottom" |
| verticalGap="6" |
| |
| <strong>Effects</strong> |
| resizeEndEffect="Dissolve" |
| resizeStartEffect="Dissolve" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:Panel> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseInterface>mx.containers.utilityClasses:IConstraintLayout</apiBaseInterface><apiBaseInterface>mx.core:IFontContextComponent</apiBaseInterface><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| Halo Panel 容器包括标题栏、标题、边框及其子项的内容区域。通常,您使用 Panel 容器包围顶级应用程序模块。例如,您可以使购物车包含在 Panel 容器中。 |
| |
| <p><b>注意:</b>Adobe 建议您,如果可能,请使用 Spark Panel 容器,而不使用 Halo Panel 容器。</p> |
| |
| <p>Panel 容器具有以下默认大小特性:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>高度足以容纳使用默认高度的所有子项、子项间的垂直间隔、上下填充、上下边框以及标题栏。宽度为以下两者之间的较大者:最宽子项的宽度加上容器的左右填充,或标题文本的宽度加上边框。</entry> |
| </row><row> |
| <entry>填充</entry> |
| <entry>上、下、左、右的值均为 4 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="SimplePanelExample.mxml"><swfblock conref="examples/SimplePanelExample.swf"/></example></apiClassifierDetail><related-links><link href="" invalidHref="spark.components.Panel.xml"><linktext>spark.components.Panel</linktext></link><link href="mx.containers.xml#ControlBar"><linktext>mx.containers.ControlBar</linktext></link><link href="mx.containers.xml#VBox"><linktext>mx.containers.VBox</linktext></link></related-links><apiConstructor id="mx.containers:Panel:Panel"><apiName>Panel</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:Panel:protected:getHeaderHeight"><apiName>getHeaderHeight</apiName><shortdesc> |
| 返回表头的高度。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiReturn><apiDesc>页眉的高度(以像素为单位)。 |
| |
| </apiDesc><apiType value="Number"/></apiReturn></apiOperationDef><apiDesc> |
| 返回表头的高度。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Panel:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算 Panel 容器默认大小的最小值和最大值。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算 Panel 容器默认大小的最小值和最大值。有关 <codeph>measure()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.measure()</codeph> 方法。 |
| |
| <p><codeph>measure()</codeph> 方法首先调用 <codeph>VBox.measure()</codeph> 方法,然后确保 <codeph>measuredWidth</codeph> 和 <codeph>measuredMinWidth</codeph> 属性的宽度足以显示标题和 ControlBar。</p> |
| |
| </apiDesc></apiOperationDetail><related-links><link href="" invalidHref="mx.core.xml#UIComponent/measure()"><linktext>mx.core.UIComponent.measure()</linktext></link></related-links></apiOperation><apiOperation id="mx.containers:Panel:protected:startDragging"><apiName>startDragging</apiName><shortdesc> |
| 当用户开始拖动已由 PopUpManager 弹出的 Panel 时调用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>event</apiItemName><apiType value="flash.events:MouseEvent"/><apiDesc>用户在容器上单击时分派 MouseEvent。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 当用户开始拖动已由 PopUpManager 弹出的 Panel 时调用。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Panel:protected:stopDragging"><apiName>stopDragging</apiName><shortdesc> |
| 当用户停止拖动已由 PopUpManager 弹出的 Panel 时调用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 当用户停止拖动已由 PopUpManager 弹出的 Panel 时调用。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiValue id="mx.containers:Panel:protected:controlBar"><apiName>controlBar</apiName><shortdesc> |
| 对此 Panel 容器控件栏(如果有)的引用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiType value="mx.core:IUIComponent"/></apiValueDef><apiDesc> |
| 对此 Panel 容器控件栏(如果有)的引用。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Panel:protected:statusTextField"><apiName>statusTextField</apiName><shortdesc> |
| 显示状态的 UITextField 子控件。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiType value="mx.core:IUITextField"/></apiValueDef><apiDesc> |
| 显示状态的 UITextField 子控件。状态字段是 <codeph>titleBar</codeph> 子控件的子项。 |
| |
| </apiDesc></apiValueDetail><related-links><link href="mx.containers.xml#Panel/titleBar"><linktext>titleBar</linktext></link></related-links></apiValue><apiValue id="mx.containers:Panel:protected:titleBar"><apiName>titleBar</apiName><shortdesc> |
| 显示 Panel 容器标题栏的 TitleBar 子控件。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiType value="mx.core:UIComponent"/></apiValueDef><apiDesc> |
| 显示 Panel 容器标题栏的 TitleBar 子控件。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Panel:protected:titleTextField"><apiName>titleTextField</apiName><shortdesc> |
| 显示标题的 UITextField 子控件。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiType value="mx.core:IUITextField"/></apiValueDef><apiDesc> |
| 显示标题的 UITextField 子控件。标题字段是 <codeph>titleBar</codeph> 子控件的子项。 |
| |
| </apiDesc></apiValueDetail><related-links><link href="mx.containers.xml#Panel/titleBar"><linktext>titleBar</linktext></link></related-links></apiValue><apiValue id="mx.containers:Panel:protected:closeButtonStyleFilters:get"><apiName>closeButtonStyleFilters</apiName><shortdesc> |
| 从 Panel 传递到关闭按钮的样式集。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Object"/></apiValueDef><apiDesc> |
| 从 Panel 传递到关闭按钮的样式集。 |
| </apiDesc></apiValueDetail><related-links><link href="" invalidHref="mx.styles.StyleProxy.xml"><linktext>mx.styles.StyleProxy</linktext></link></related-links></apiValue><apiValue id="mx.containers:Panel:constraintColumns:get"><apiName>constraintColumns</apiName><shortdesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintColumns"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Array"/></apiValueDef><apiDesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintColumns"> |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Panel:constraintRows:get"><apiName>constraintRows</apiName><shortdesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintRows"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Array"/></apiValueDef><apiDesc conref="mx.containers.utilityClasses.IConstraintLayout#constraintRows"> |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Panel:fontContext:get"><apiName>fontContext</apiName><shortdesc> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="mx.core:IFlexModuleFactory"/></apiValueDef><apiDesc> |
| </apiDesc></apiValueDetail><apiInheritDoc/></apiValue><apiValue id="mx.containers:Panel:layout:get"><apiName>layout</apiName><shortdesc> |
| 指定用于此容器的布局机制。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="layoutChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/><apiDefaultValue>"vertical" |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 指定用于此容器的布局机制。Panel 容器可以使用 <codeph>"vertical"</codeph>、<codeph>"horizontal"</codeph> 或 <codeph>"absolute"</codeph> 进行定位。垂直定位按照指定的顺序从容器的顶部到底部垂直排列子组件。水平定位按照指定的顺序从容器的左侧到右侧水平排列子组件。绝对定位不会进行自动布局,它需要您显式定义每个子组件的位置。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Panel:status:get"><apiName>status</apiName><shortdesc> |
| 标题栏状态区域中的文本。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="statusChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/><apiDefaultValue>"" |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 标题栏状态区域中的文本。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Panel:titleIcon:get"><apiName>titleIcon</apiName><shortdesc> |
| 标题栏中显示的图标。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="titleIconChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Class"/><apiDefaultValue>null |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 标题栏中显示的图标。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Panel:title:get"><apiName>title</apiName><shortdesc> |
| 标题栏中显示的标题。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata><asCustoms><helpid>3991 |
| |
| </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="titleChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/><apiDefaultValue>"" |
| |
| </apiDefaultValue><apiTipTexts><apiTipText>获取或设置标题栏中显示的标题。 |
| </apiTipText></apiTipTexts></apiValueDef><apiDesc> |
| 标题栏中显示的标题。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:Tile"><apiName>Tile</apiName><shortdesc> |
| Halo Tile 容器将其子项放在由大小相等的单元格组成的网格中。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Alternative owner="mx.containers:Tile" replacement="spark.components.BorderContainer" since="4.0"> |
| </Alternative><Alternative owner="mx.containers:Tile" replacement="spark.components.TileGroup" since="4.0"> |
| <description> |
| Flex 3 中的布局特定容器组件已替换为采用通用布局的一个更通用的 Group 组件。要从新的 Group 组件实现相似的行为,请将 <codeph>layout</codeph> 属性设置为 <codeph>TileLayout</codeph> 或使用 TileGroup 容器。 |
| </description> |
| </Alternative><styles><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:Tile" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。 |
| |
| </description> |
| <default>6 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="bottom,middle,top" inherit="no" name="verticalAlign" owner="mx.containers:Tile" playerVersion="Flash9" type="String"> |
| <description> |
| 垂直对齐平铺单元格中的各子项。可能值包括 <codeph>"top"</codeph>、<codeph>"middle"</codeph> 和 <codeph>"bottom"</codeph>。如果将此值设为 <codeph>"top"</codeph>,则各子项的顶部边缘位于其单元格的顶边处。如果将此值设为 <codeph>"middle"</codeph>,则各子项在其单元格中垂直居中。如果将此值设为 <codeph>"bottom"</codeph>,则各子项的底部边缘位于其单元格的底边处。 |
| |
| </description> |
| <default>"top" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:Tile" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的上边框与其内容区域之间的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingBottom" owner="mx.containers:Tile" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的下边框与其内容区域之间的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:Tile" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。 |
| |
| </description> |
| <default>8 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="no" name="horizontalAlign" owner="mx.containers:Tile" playerVersion="Flash9" type="String"> |
| <description> |
| 水平对齐平铺单元格中的各子项。可能值包括 <codeph>"left"</codeph>、<codeph>"center"</codeph> 和 <codeph>"right"</codeph>。如果将此值设为 <codeph>"left"</codeph>,则各子项的左边缘位于其单元格的左边处。如果将此值设为 <codeph>"center"</codeph>,则各子项在其单元格中水平居中。如果将此值设为 <codeph>"right"</codeph>,则各子项的右边缘位于其单元格的右边处。 |
| |
| </description> |
| <default>"left" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:Tile></code> tag inherits all of the tag attributes |
| of its superclass, and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:Tile |
| <b>Properties</b> |
| direction="horizontal|vertical" |
| tileHeight="NaN" |
| tileWidth="NaN" |
| |
| <b>Sttles</b> |
| horizontalAlign="left|center|right" |
| horizontalGap="8" |
| paddingBottom="0" |
| paddingTop="0" |
| verticalAlign="top|middle|bottom" |
| verticalGap="6" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:Tile> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| Halo Tile 容器将其子项放在由大小相等的单元格组成的网格中。您可以使用 <codeph>tileWidth</codeph> 和 <codeph>tileHeight</codeph> 属性指定这些单元格的大小,或让 Tile 容器根据最大子项确定单元格大小。Tile 容器的 <codeph>direction</codeph> 属性可确定是水平还是垂直列出其单元格(从 Tile 容器的左上角开始)。 |
| |
| <p><b>注意:</b>Adobe 建议您,如果可能,请使用具有 TileLayout 的 Spark 容器,而不使用 Halo Tile 容器。</p> |
| |
| <p>Tile 容器具有下列默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>方向</entry> |
| <entry>horizontal</entry> |
| </row><row> |
| <entry>所有单元格的默认大小</entry> |
| <entry>高度采用默认值或最高子项的明确指定的高度。宽度采用默认值或最宽子项的明确指定的宽度。所有单元格的默认大小相同。</entry> |
| </row><row> |
| <entry>Tile 容器的默认大小</entry> |
| <entry>Flex 计算子项数目的平方根并将其向上舍入到最近的整数。例如,如果有 26 个子项,则平方根是 5.1,其舍入值为 6。然后,Flex 在 6 × 6 的网格中对 Tile 容器进行布局。Tile 容器的默认高度等于(平铺单元格默认高度)<b>x</b>(子项数目平方根的舍入值)和子项与任何填充之间的所有间距之和。默认宽度等于(平铺单元格默认宽度)<b>x</b>(子项数目平方根的舍入值)和子项与任何填充之间的所有间距之和。</entry> |
| </row><row> |
| <entry>Tile 容器的最小大小</entry> |
| <entry>单个单元格的默认大小。Flex 始终会分配至少足够显示一个单元格的空间。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="TileLayoutExample.mxml"><swfblock conref="examples/TileLayoutExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.core.xml#Container"><linktext>mx.core.Container</linktext></link></related-links><apiConstructor id="mx.containers:Tile:Tile"><apiName>Tile</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:Tile:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算 Tile 容器的默认最小大小和最大大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算 Tile 容器的默认最小大小和最大大小。有关 <codeph>measure()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.measure()</codeph> 方法。 |
| |
| <p>此方法首先计算每个平铺单元格的大小。有关如何确定单元格大小的说明,请参阅 <codeph>tileWidth</codeph> 和 <codeph>tileHeight</codeph> 属性。</p> |
| |
| <p>包含子项的 Tile 容器的度量大小足以在 N × N 网格中显示同等行数和列数的单元格,以及 Tile 容器的填充和边框的空间。不过,还有一些特殊情形,如下例所示:</p> |
| |
| <ul> |
| <li>如果水平 Tile 容器设置了显式宽度,该值就确定了水平方向上容纳的单元格数,此时将计算显示所有子项所需的宽度,这就会生成一个 M × N 网格。</li> |
| |
| <li>如果垂直 Tile 容器设置了显式高度,该值就确定了垂直方向上容纳的单元格数,此时将计算显示所有子项所需的宽度,这就会生成一个 N × M 网格。</li> |
| </ul> |
| |
| <p>如果没有子项,则度量大小恰好能够容纳其填充和边框。</p> |
| |
| <p>包含子项的 Tile 容器的最小度量大小恰好能够容纳一个平铺单元格以及填充和边框。如果没有子项,则最小度量大小恰好能够容纳其填充和边框。</p> |
| |
| </apiDesc></apiOperationDetail><related-links><link href="" invalidHref="mx.core.xml#UIComponent/measure()"><linktext>mx.core.UIComponent.measure()</linktext></link></related-links></apiOperation><apiOperation id="mx.containers:Tile:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 设置此容器的子项的位置和大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 设置此容器的子项的位置和大小。有关 <codeph>updateDisplayList()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.updateDisplayList()</codeph> 方法。 |
| |
| <p>此方法将各子项定位在 Tile 容器的内容区域(如,填充中的区域)内部由大小相等的单元格组成的棋盘样式的网格中。有关如何确定单元格大小的说明,请参阅 <codeph>tileWidth</codeph> 和 <codeph>tileHeight</codeph> 属性。</p> |
| |
| <p>单元格之间的间隔由 <codeph>horizontalGap</codeph> 和 <codeph>verticalGap</codeph> 样式确定。各子项在其单元格中的位置由 <codeph>horizontalAlign</codeph> 和 <codeph>verticalAlign</codeph> 样式确定。</p> |
| |
| <p>子项的流向由 <codeph>direction</codeph> 属性确定。第一个单元格总是放置在内容区域的左上角。如果将 <codeph>direction</codeph> 设置为 <codeph>"horizontal"</codeph>,则在最顶行中从左到右放置单元格,在第二行中则从左到右进行放置,依此类推。如果将 <codeph>direction</codeph> 设置为 <codeph>"vertical"</codeph>,则在最左列中从上到下放置单元格,在第二列中则从上到下进行放置,依此类推。</p> |
| |
| <p>如果子项设置了 <codeph>percentWidth</codeph> 或 <codeph>percentHeight</codeph> 值,则沿相应方向调整其大小,以填充其平铺单元格的指定百分比。</p> |
| |
| </apiDesc></apiOperationDetail><related-links><link href="" invalidHref="mx.core.xml#UIComponent/updateDisplayList()"><linktext>mx.core.UIComponent.updateDisplayList()</linktext></link></related-links></apiOperation><apiValue id="mx.containers:Tile:direction:get"><apiName>direction</apiName><shortdesc> |
| 确定子项在容器中的放置方式。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="directionChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/><apiDefaultValue>"horizontal" |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 确定子项在容器中的放置方式。可能的 MXML 值包括 <codeph>"horizontal"</codeph> 和 <codeph>"vertical"</codeph>。在 ActionScript 中,您可以使用 TileDirection.HORIZONTAL 或 TileDirection.VERTICAL 值设置方向。默认值是 <codeph>"horizontal"</codeph>。(如果容器是作为 Tile 子类的 Legend 容器,则默认值是 <codeph>"vertical"</codeph>。) |
| |
| <p>第一个子项总是放置在 Tile 容器的左上角。如果将 <codeph>direction</codeph> 设置为 <codeph>"horizontal"</codeph>,则在最顶行中从左到右放置子项,在第二行中则从左到右进行放置,依此类推。如果将该值设置为 <codeph>"vertical"</codeph>,则在最左列中从上到下放置子项,在第二列中则从上到下进行放置,依此类推。</p> |
| |
| </apiDesc></apiValueDetail><related-links><link href="mx.containers.xml#TileDirection"><linktext>TileDirection</linktext></link></related-links></apiValue><apiValue id="mx.containers:Tile:tileHeight:get"><apiName>tileHeight</apiName><shortdesc> |
| 每个平铺单元格的高度(以像素为单位)。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="resize"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Number"/><apiDefaultValue>NaN |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 每个平铺单元格的高度(以像素为单位)。如果此属性为 <codeph>NaN</codeph>,则默认情况下,各单元格的高度由最高子项的高度确定。如果设置了此属性,则指定的值将覆盖此计算值。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:Tile:tileWidth:get"><apiName>tileWidth</apiName><shortdesc> |
| 每个平铺单元格的宽度(以像素为单位)。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="resize"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Number"/><apiDefaultValue>NaN |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 每个平铺单元格的宽度(以像素为单位)。如果此属性为 <codeph>NaN</codeph>,则默认情况下,各单元格的宽度由最宽子项的宽度确定。如果设置了此属性,则指定的值将覆盖此计算值。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:VDividedBox"><apiName>VDividedBox</apiName><shortdesc> |
| 与 VBox 容器相同,VDividedBox 容器垂直放置其子项,但会在各子项之间插入一个可拖动的分隔符。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="direction"/></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:VDividedBox></code> tag inherits all of the tag |
| attributes of its superclass, except <code>direction</code>, and adds |
| no new tag attributes.</p> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:DividedBox</apiBaseClassifier></apiClassifierDef><apiDesc> |
| 与 VBox 容器相同,VDividedBox 容器垂直放置其子项,但会在各子项之间插入一个可拖动的分隔符。用户可以通过拖动此分隔符来调整分配给各子项的区域大小。<codeph><mx:VDividedBox/></codeph> 标签与 <codeph><mx:DividedBox direction="vertical"/></codeph> 相同。 |
| |
| <p>VDividedBox 容器具有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>高度足以容纳以下内容:使用默认高度或明确指定的高度时的所有子项、各子项间的垂直间隔,以及容器的顶部和底部填充。宽度采用默认值,或最宽子项的明确指定的宽度与容器的左右填充之和。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row><row> |
| <entry>默认间距</entry> |
| <entry>水平和垂直间距为 10 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="VDividedBoxExample.mxml"><swfblock conref="examples/VDividedBoxExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#DividedBox"><linktext>mx.containers.DividedBox</linktext></link><link href="mx.containers.xml#HDividedBox"><linktext>mx.containers.HDividedBox</linktext></link></related-links><apiConstructor id="mx.containers:VDividedBox:VDividedBox"><apiName>VDividedBox</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="mx.containers:BoxDirection"><apiName>BoxDirection</apiName><shortdesc> |
| BoxDirection 类为 Box 容器的 direction 属性指定常数值。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc> |
| BoxDirection 类为 Box 容器的 <codeph>direction</codeph> 属性指定常量值。 |
| |
| </apiDesc></apiClassifierDetail><related-links><link href="mx.containers.xml#Box"><linktext>mx.containers.Box</linktext></link></related-links><apiValue id="mx.containers:BoxDirection:HORIZONTAL"><apiName>HORIZONTAL</apiName><shortdesc> |
| 指定 Box 容器的子项按水平方式布局。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>horizontal</apiData><apiType value="String"/></apiValueDef><apiDesc> |
| 指定 Box 容器的子项按水平方式布局。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:BoxDirection:VERTICAL"><apiName>VERTICAL</apiName><shortdesc> |
| 指定 Box 容器的子项按垂直方式布局。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>vertical</apiData><apiType value="String"/></apiValueDef><apiDesc> |
| 指定 Box 容器的子项按垂直方式布局。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:Form"><apiName>Form</apiName><shortdesc> |
| 通过 Form 容器,您可以控制表单布局、将表单字段标记为必填或可选、处理错误消息以及将表单数据绑定到 Flex 数据模型以执行数据检查和验证。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Alternative owner="mx.containers:Form" replacement="spark.components.Form" since="4.5"> |
| </Alternative><styles><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:Form" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的上边框与其内容区域的上边缘之间的像素数目。默认值为 16。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingBottom" owner="mx.containers:Form" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的下边框与其内容区域的下边缘之间的像素数目。默认值为 16。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="labelWidth" owner="mx.containers:Form" playerVersion="Flash9" type="Number"> |
| <description> |
| 表单标签的宽度。默认值为表单中最长标签的长度。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="indicatorGap" owner="mx.containers:Form" playerVersion="Flash9" type="Number"> |
| <description> |
| 标签和子组件之间的像素数目。默认值为 14。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:Form" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 6。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:Form" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 8。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:Form></code> tag inherits all the tag |
| attributes of its superclass and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:Form |
| <strong>Styles</strong> |
| horizontalGap="8" |
| indicatorGap="14" |
| labelWidth="<i>Calculated</i>" |
| paddingBottom="16" |
| paddingTop="16" |
| verticalGap="6" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:Form> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| 通过 Form 容器,您可以控制表单布局、将表单字段标记为必填或可选、处理错误消息以及将表单数据绑定到 Flex 数据模型以执行数据检查和验证。通过它,您还可以使用样式表来配置表单的外观。 |
| |
| <p>下表描述了 Flex 中用于创建表单的组件:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| <tgroup cols="3"><thead><row><entry>组件</entry><entry>标签</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>Form</entry> |
| <entry><codeph><mx:Form></codeph></entry> |
| <entry>定义整个表单(包括整个表单布局)的容器。使用 FormHeading 控件和 FormItem 容器定义内容。您也可以在 Form 容器中插入其它类型的组件。</entry> |
| </row><row> |
| <entry>FormHeading</entry> |
| <entry><codeph><mx:FormHeading></codeph></entry> |
| <entry>在表单中定义标题。可在一个 Form 容器中拥有多个 FormHeading 控件。</entry> |
| </row><row> |
| <entry>FormItem</entry> |
| <entry><codeph><mx:FormItem></codeph></entry> |
| <entry>包含一个或多个水平或垂直排列的表单子项。子容器可以是控件,也可以是其他容器。一个 Form 容器可以容纳多个 FormItem 容器。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="FormExample.mxml"><swfblock conref="examples/FormExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#FormHeading"><linktext>mx.containers.FormHeading</linktext></link><link href="mx.containers.xml#FormItem"><linktext>mx.containers.FormItem</linktext></link></related-links><apiConstructor id="mx.containers:Form:Form"><apiName>Form</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:Form:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算表单的首选大小、最小大小和最大大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算表单的首选大小、最小大小和最大大小。有关 <codeph>measure</codeph> 方法的详细信息,请参见 <codeph>UIComponent.measure()</codeph> 方法。 |
| <p><codeph>Form.measure()</codeph> 方法将 <codeph>measuredWidth</codeph> 属性设置为下列值之和:最大子项的宽度、<codeph>paddingLeft</codeph> 和 <codeph>paddingRight</codeph> 样式属性的值,以及边界宽度。</p> |
| |
| <p>将 <codeph>measuredHeight</codeph> 属性设置为下列值之和:所有子项的 <codeph>measuredHeight</codeph> 以及各子项间的 <codeph>verticalGap</codeph> 距离。还添加了 <codeph>paddingTop</codeph> 和 <codeph>paddingBottom</codeph> 样式属性以及边框高度。</p> |
| |
| <p>将 <codeph>measuredMinWidth</codeph> 属性设置为所有子项的最小宽度中的最大值。如果子项的 <codeph>width</codeph> 是一个百分比值,则使用 <codeph>minWidth</codeph> 属性;否则,使用 <codeph>measuredWidth</codeph> 属性。还添加了 <codeph>paddingLeft</codeph> 和 <codeph>paddingRight</codeph> 样式属性值以及边框宽度。</p> |
| |
| <p>将 <codeph>measuredMinHeight</codeph> 属性设置为与 <codeph>measuredHeight</codeph> 属性相同的值。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Form:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 通过设置此容器的子容器的位置和大小来响应大小更改。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 通过设置此容器的子容器的位置和大小来响应大小更改。有关 <codeph>updateDisplayList()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.updateDisplayList()</codeph> 方法。 |
| |
| <p><codeph>Form.updateDisplayList()</codeph> 方法将子项在垂直列中进行定位,间距为 <codeph>verticalGap</codeph> 样式属性的值。应用 <codeph>paddingLeft</codeph>、<codeph>paddingRight</codeph>、<codeph>paddingTop</codeph> 和 <codeph>paddingBottom</codeph> 样式属性。</p> |
| |
| <p>如果某个子项采用了百分比宽度,则该子项将沿水平方向扩展到 Form 容器的指定百分比;否则,该子项将被设置为其 <codeph>measuredWidth</codeph> 属性指定的宽度。每个子项都会设置为其 <codeph>measuredHeight</codeph> 属性指定的高度。</p> |
| |
| <p>此方法在调用 <codeph>super.updateDisplayList()</codeph> 方法后才会进行其他操作。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiValue id="mx.containers:Form:maxLabelWidth:get"><apiName>maxLabelWidth</apiName><shortdesc> |
| 此表单的 FormItems 容器中的标签的最大宽度(以像素为单位)。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="updateComplete"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Number"/></apiValueDef><apiDesc> |
| 此表单的 FormItems 容器中的标签的最大宽度(以像素为单位)。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:ViewStack"><apiName>ViewStack</apiName><shortdesc> |
| MX ViewStack 导航器容器由一组彼此上下堆叠的子容器组成,其中一次只可以显示一个子容器。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="verticalScrollBarStyleName"/><Exclude kind="style" name="horizontalScrollBarStyleName"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="scroll"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="property" name="verticalScrollPosition"/><Exclude kind="property" name="verticalScrollPolicy"/><Exclude kind="property" name="verticalScrollBar"/><Exclude kind="property" name="verticalPageScrollSize"/><Exclude kind="property" name="verticalLineScrollSize"/><Exclude kind="property" name="maxVerticalScrollPosition"/><Exclude kind="property" name="maxHorizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPolicy"/><Exclude kind="property" name="horizontalScrollBar"/><Exclude kind="property" name="horizontalPageScrollSize"/><Exclude kind="property" name="horizontalLineScrollSize"/><Exclude kind="property" name="defaultButton"/><Exclude kind="property" name="autoLayout"/><styles><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:ViewStack" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的上边框与其内容区域之间的像素数目。默认值为 0。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingBottom" owner="mx.containers:ViewStack" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的下边框与其内容区域之间的像素数目。默认值为 0。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:ViewStack" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 6。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:ViewStack" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 8。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:ViewStack></code> tag inherits the |
| tag attributes of its superclass, with the exception of scrolling-related |
| attributes, and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:ViewStack |
| <b>Properties</b> |
| historyManagementEnabled="false|true" |
| resizeToContent="false|true" |
| selectedIndex="0" |
| |
| <b>Styles</b> |
| horizontalGap="8" |
| paddingBottom="0" |
| paddingTop="0" |
| verticalGap="6" |
| |
| <b>Events</b> |
| change="<i>No default</i>" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:ViewStack> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseInterface>mx.managers:IHistoryManagerClient</apiBaseInterface><apiBaseInterface>mx.core:ISelectableList</apiBaseInterface><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| MX ViewStack 导航器容器由一组彼此上下堆叠的子容器组成,其中一次只可以显示一个子容器。选择另一个子容器后,它将显示在原来子容器的位置处,所以看起来好像此子容器替换了原来的子容器。但是,原来的子容器仍然存在,只不过它现在处于不可见状态。 |
| |
| <p><b>注意:</b>MX 导航器容器的直接子容器必须为 MX 容器(MX 布局或 MX 导航器容器)或者 Spark NavigatorContent 容器。您不能直接在某一导航器中嵌套控件或除 Spark NavigatorContent 容器之外的 Spark 容器;它们必须是子 MX 容器的子容器。</p> |
| |
| <p>ViewStack 容器不提供用于选择当前哪个子容器可见的用户界面。通常,在 ActionScript 中设置其 <codeph>selectedIndex</codeph> 或 <codeph>selectedChild</codeph> 属性以响应某些用户操作。或者,可以将 MX LinkBar、TabBar、ButtonBar 或者 ToggleButtonBar 控件或 Spark ButtonBar 控件与 ViewStack 容器关联,以提供一个导航界面。为此,请将 ViewStack 容器指定为 LinkBar、TabBar 或 ToggleButtonBar 容器的 <codeph>dataProvider</codeph> 属性的值。</p> |
| |
| <p>您可能决定使用一个比 ViewStack 容器更复杂的导航器容器,如 TabNavigator 容器或 Accordion 容器。除了具有一组子容器外,这些容器还提供了自身的用户界面,用于在其子容器之间进行导航。</p> |
| |
| <p>更改当前可见的子容器时,可使用要隐藏的容器的 <codeph>hideEffect</codeph> 属性和刚变为可见状态的子容器的 <codeph>showEffect</codeph> 属性将效果应用于子容器。ViewStack 容器将等到要隐藏的子容器的 <codeph>hideEffect</codeph> 完成后才显示新的子容器。如果在播放效果的同时更改 ViewStack 容器的 <codeph>selectedIndex</codeph> 属性,则会中断当前的播放效果。</p> |
| |
| <p>ViewStack 容器具有下列默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry>初始活动子容器的宽度和高度。</entry> |
| </row><row> |
| <entry>容器大小调整规则</entry> |
| <entry>默认情况下,ViewStack 容器仅调整一次大小来适应第一个子容器的大小。这些容器不会在您导航到其他子容器时再次调整大小。若要强制 ViewStack 容器在您导航到其他子容器后调整大小,请将 resizeToContent 属性设置为 true。</entry> |
| </row><row> |
| <entry>子项大小调整规则</entry> |
| <entry>子项均设置为各自的默认大小。如果子容器大于 ViewStack 容器,将对其进行剪裁。如果子容器小于 ViewStack 容器,则将其与 ViewStack 容器的左上角对齐。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="ViewStackExample.mxml"><swfblock conref="examples/ViewStackExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.controls.xml#LinkBar"><linktext>mx.controls.LinkBar</linktext></link><link href="mx.controls.xml#ButtonBar"><linktext>mx.controls.ButtonBar</linktext></link><link href="mx.controls.xml#TabBar"><linktext>mx.controls.TabBar</linktext></link><link href="mx.controls.xml#ToggleButtonBar"><linktext>mx.controls.ToggleButtonBar</linktext></link><link href="" invalidHref="spark.components.ButtonBar.xml"><linktext>spark.components.ButtonBar</linktext></link><link href="" invalidHref="mx.managers.HistoryManager.xml"><linktext>mx.managers.HistoryManager</linktext></link><link href="" invalidHref="mx.managers.LayoutManager.xml"><linktext>mx.managers.LayoutManager</linktext></link></related-links><adobeApiEvent id="mx.containers:ViewStack_mx.events.IndexChangedEvent.CHANGE_change"><apiName>change</apiName><shortdesc> |
| 当所选的子容器更改时分派此方法。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><adobeApiEventDetail><adobeApiEventDef><apiEventType>mx.events.IndexChangedEvent.CHANGE</apiEventType><adobeApiEventClassifier>mx.events.IndexChangedEvent</adobeApiEventClassifier><apiGeneratedEvent/></adobeApiEventDef><apiDesc> |
| 当所选的子容器更改时分派此方法。 |
| |
| </apiDesc></adobeApiEventDetail></adobeApiEvent><apiConstructor id="mx.containers:ViewStack:ViewStack"><apiName>ViewStack</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:ViewStack:protected:commitSelectedIndex"><apiName>commitSelectedIndex</apiName><shortdesc> |
| 提交所选索引。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>newIndex</apiItemName><apiType value="int"/><apiDesc>所选索引。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 提交所选索引。在提交属性阶段,当 <codeph>selectedIndex</codeph> 或 <codeph>selectedItem</codeph> 属性发生更改时,调用此函数。 |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:ViewStack:loadState"><apiName>loadState</apiName><shortdesc conref="mx.managers.IHistoryManagerClient#loadState()"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>state</apiItemName><apiType value="Object"/></apiParam></apiOperationDef><apiDesc conref="mx.managers.IHistoryManagerClient#loadState()"> |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:ViewStack:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算 ViewStack 容器的默认大小以及最小值和最大值。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算 ViewStack 容器的默认大小以及最小值和最大值。有关 <codeph>measure()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.measure()</codeph> 方法。 |
| |
| <p>ViewStack 容器的默认大小为其当前选定的子容器的默认大小与填充和边框之和。如果 ViewStack 容器不包含子容器,则其默认大小恰好能够容纳其填充和边框。</p> |
| |
| <p>ViewStack 容器的最小大小为其当前选定的子容器的最小大小与填充及边框之和。如果 ViewStack 容器不包含子容器,则其最小大小恰好能够容纳其填充和边框。</p> |
| |
| <p>此方法不会更改 ViewStack 容器的最大大小(依然不受限制)。</p> |
| |
| </apiDesc></apiOperationDetail><related-links><link href="" invalidHref="mx.core.xml#UIComponent/measure()"><linktext>mx.core.UIComponent.measure()</linktext></link></related-links></apiOperation><apiOperation id="mx.containers:ViewStack:saveState"><apiName>saveState</apiName><shortdesc conref="mx.managers.IHistoryManagerClient#saveState()"> |
| </shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="Object"/></apiReturn></apiOperationDef><apiDesc conref="mx.managers.IHistoryManagerClient#saveState()"> |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:ViewStack:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 通过设置此容器的子容器的位置和大小来响应大小更改。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 通过设置此容器的子容器的位置和大小来响应大小更改。有关 <codeph>updateDisplayList()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.updateDisplayList()</codeph> 方法。 |
| |
| <p>一次只有一个子容器可见,因此 ViewStack 容器将仅对该子容器进行定位和大小调整。</p> |
| |
| <p>将所选子容器定位在 ViewStack 容器的左上角,同时为 ViewStack 容器的填充和边框留有空间。 </p> |
| |
| <p>如果所选子容器包含一个百分比 <codeph>width</codeph> 或 <codeph>height</codeph> 值,则将在该方向上对其进行大小调整以按照指定百分比填充 ViewStack 容器的内容区域(即,其填充中的区域)。</p> |
| |
| </apiDesc></apiOperationDetail><related-links><link href="" invalidHref="mx.core.xml#UIComponent/updateDisplayList()"><linktext>mx.core.UIComponent.updateDisplayList()</linktext></link></related-links></apiOperation><apiValue id="mx.containers:ViewStack:protected:contentHeight:get"><apiName>contentHeight</apiName><shortdesc> |
| 显示内容的区域的高度,以像素为单位。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Number"/></apiValueDef><apiDesc> |
| 显示内容的区域的高度,以像素为单位。如果您的内容没有完全占据 ViewStack 容器区域,可以覆盖此 getter 函数。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:ViewStack:protected:contentWidth:get"><apiName>contentWidth</apiName><shortdesc> |
| 显示内容的区域的宽度,以像素为单位。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Number"/></apiValueDef><apiDesc> |
| 显示内容的区域的宽度,以像素为单位。如果您的内容没有完全占据 ViewStack 容器区域,可以覆盖此 getter 函数。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:ViewStack:protected:contentX:get"><apiName>contentX</apiName><shortdesc> |
| 显示内容的 ViewStack 容器区域的 x 坐标(以像素为单位)。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Number"/></apiValueDef><apiDesc> |
| 显示内容的 ViewStack 容器区域的 x 坐标(以像素为单位)。其默认值等于 <codeph>paddingLeft</codeph> 样式属性(默认值为 0)的值。如果您不希望您的内容从 x = 0 处开始布局,请覆盖 <codeph>get()</codeph> 方法。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:ViewStack:protected:contentY:get"><apiName>contentY</apiName><shortdesc> |
| 显示内容的 ViewStack 容器区域的 y 坐标(以像素为单位)。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="protected"/><apiDynamic/><apiValueAccess value="read"/><apiType value="Number"/></apiValueDef><apiDesc> |
| 显示内容的 ViewStack 容器区域的 y 坐标(以像素为单位)。其默认值等于 <codeph>paddingTop</codeph> 样式属性(默认值为 0)的值。如果您不希望您的内容从 y = 0 处开始布局,请覆盖 <codeph>get()</codeph> 方法。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:ViewStack:historyManagementEnabled:get"><apiName>historyManagementEnabled</apiName><shortdesc> |
| 如果为 true,则在此 ViewStack 容器内启用历史记录管理。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果为 <codeph>true</codeph>,则在 ViewStack 容器内启用历史记录管理。当用户从一个子项导航到另一个子项时,浏览器将记录访问过的子项。然后,用户可以单击浏览器的“后退”和“前进”按钮浏览此导航历史记录。 |
| |
| </apiDesc></apiValueDetail><related-links><link href="" invalidHref="mx.managers.HistoryManager.xml"><linktext>mx.managers.HistoryManager</linktext></link></related-links></apiValue><apiValue id="mx.containers:ViewStack:resizeToContent:get"><apiName>resizeToContent</apiName><shortdesc> |
| 如果为 true,则 ViewStack 容器将自动调整为其当前子容器的大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果为 <codeph>true</codeph>,则 ViewStack 容器将自动调整为其当前子容器的大小。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:ViewStack:selectedChild:get"><apiName>selectedChild</apiName><shortdesc> |
| 对当前可见子容器的引用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="creationComplete"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="mx.core:INavigatorContent"/></apiValueDef><apiDesc> |
| 对当前可见子容器的引用。默认设置为对第一个子容器的引用。如果没有子项,则此属性为 <codeph>null</codeph>。 |
| |
| <p><b>注意:</b>您只能在 ActionScript 语句中设置此属性,而不能在 MXML 中进行设置。</p> |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:ViewStack:selectedIndex:get"><apiName>selectedIndex</apiName><shortdesc> |
| 当前可见子容器的从零开始的索引。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="creationComplete"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="int"/></apiValueDef><apiDesc> |
| 当前可见子容器的从零开始的索引。子索引的范围是 0、1、2、...、n - 1,其中 <i>n</i> 是子项的数目。默认值是 0,对应于第一个子项。如果不存在子容器,则此属性的值为 <codeph>-1</codeph>。 |
| |
| <p><b>注意:</b>当您将一个新的子容器添加到 ViewStack 容器时,<codeph>selectedIndex</codeph> 属性将根据需要自动调整,以使所选子容器仍处于选中状态。</p> |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:GridRow"><apiName>GridRow</apiName><shortdesc> |
| GridRow 容器在 Grid 容器中定义一行,并包含 GridCell 容器。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="moveEffect"/><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="verticalScrollBarStyleName"/><Exclude kind="style" name="verticalGap"/><Exclude kind="style" name="horizontalScrollBarStyleName"/><Exclude kind="style" name="horizontalGap"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="scroll"/><Exclude kind="event" name="move"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Exclude kind="method" name="setFocus"/><Exclude kind="method" name="isOurFocus"/><Exclude kind="method" name="getFocus"/><Exclude kind="method" name="adjustFocusRect"/><Exclude kind="property" name="verticalScrollPosition"/><Exclude kind="property" name="verticalScrollPolicy"/><Exclude kind="property" name="verticalScrollBar"/><Exclude kind="property" name="verticalPageScrollSize"/><Exclude kind="property" name="verticalLineScrollSize"/><Exclude kind="property" name="mouseFocusEnabled"/><Exclude kind="property" name="maxVerticalScrollPosition"/><Exclude kind="property" name="maxHorizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPosition"/><Exclude kind="property" name="horizontalScrollPolicy"/><Exclude kind="property" name="horizontalScrollBar"/><Exclude kind="property" name="horizontalPageScrollSize"/><Exclude kind="property" name="horizontalLineScrollSize"/><Exclude kind="property" name="focusPane"/><Exclude kind="property" name="focusManager"/><Exclude kind="property" name="focusEnabled"/><Exclude kind="property" name="direction"/><Exclude kind="property" name="clipContent"/><styles><style enumeration="bottom,middle,top" inherit="no" name="verticalAlign" owner="mx.containers:GridRow" playerVersion="Flash9" type="String"> |
| <description> |
| 垂直对齐容器中的子项。可能值包括 <codeph>"top"</codeph>、<codeph>"middle"</codeph> 和 <codeph>"bottom"</codeph>。默认值为 <codeph>"top"</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="no" name="horizontalAlign" owner="mx.containers:GridRow" playerVersion="Flash9" type="String"> |
| <description> |
| 水平对齐容器中的子容器。可能值包括 <codeph>"left"</codeph>、<codeph>"center"</codeph> 和 <codeph>"right"</codeph>。默认值为 <codeph>"left"</codeph>。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:GridRow></code> must be a child of the |
| <code><mx:Grid></code> tag, and has one or more child |
| <code><mx:GridItem></code> tags that define the grid cells.</p> |
| |
| <p>The <code><mx:GridRow></code> container inherits the |
| tag attributes of its superclass, and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:Grid> |
| <mx:GridRow |
| <strong>Styles</strong> |
| horizontalAlign="left|center|right" |
| verticalAlign="top|middle|bottom" |
| > |
| <mx:GridItem |
| <i>child components</i> |
| </mx:GridItem> |
| ... |
| </mx:GridRow> |
| ... |
| </mx:Grid> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.containers:HBox</apiBaseClassifier></apiClassifierDef><apiDesc> |
| GridRow 容器在 Grid 容器中定义一行,并包含 GridCell 容器。 |
| |
| <p>GridRow 容器具有以下默认大小特征:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>每行以及每个单元格的高度</entry> |
| <entry>默认值或行中最高项目的显式高度。如果 GridItem 容器未设定显式大小,则其默认高度为单元格中子项的默认或显式高度。</entry> |
| </row><row> |
| <entry>每列以及每个单元格的宽度</entry> |
| <entry>默认值或列中最宽项目的显式宽度。如果 GridItem 容器未设定显式宽度,则其默认宽度为单元格中子项的默认或显式宽度。</entry> |
| </row><row> |
| <entry>行与列的间距</entry> |
| <entry>由 Grid 类的 horizontalGap 和 verticalGap 属性确定。这两个间距的默认值是 6 个像素。</entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>所有三个容器类的 top、bottom、left 和 right 值均为 0 个像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="GridLayoutExample.mxml"><swfblock conref="examples/GridLayoutExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#Grid"><linktext>mx.containers.Grid</linktext></link><link href="mx.containers.xml#GridItem"><linktext>mx.containers.GridItem</linktext></link></related-links><apiConstructor id="mx.containers:GridRow:GridRow"><apiName>GridRow</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:GridRow:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 设置 GridRow 容器中各子项的大小和位置。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 设置 GridRow 容器中各子项的大小和位置。有关 Grid 布局算法的详细信息,请参见 <xref href="Grid.html#updateDisplayList()">Grid.updateDisplayList()</xref> 方法。 |
| |
| <p>不应该直接调用此方法。Flex LayoutManager 会在合适的时间调用此方法。启动应用程序时,Flex LayoutManager 将对每个组件调用 <codeph>updateDisplayList()</codeph> 方法,从根组件开始,依次向下。</p> |
| |
| <p>此方法是在细分过程中使用的高级方法。如果覆盖此方法,则应调用 <codeph>super.updateDisplayList()</codeph> 方法,并对各个子项调用 <codeph>move()</codeph> 和 <codeph>setActualSize()</codeph> 方法来实现此效果。要执行布局,您应该从 <codeph>unscaledWidth</codeph> 和 <codeph>unscaledHeight</codeph> 属性中获取此容器的大小,而不是从 <codeph>width</codeph> 和 <codeph>height</codeph> 属性中进行获取。对于此容器,<codeph>width</codeph> 和 <codeph>height</codeph> 属性无需考虑 <codeph>scaleX</codeph> 和 <codeph>scaleY</codeph> 属性的值。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation></apiClassifier><apiClassifier id="mx.containers:Box"><apiName>Box</apiName><shortdesc> |
| Halo Box 容器将其子项放在同一垂直列或同一水平行中。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Alternative owner="mx.containers:Box" replacement="spark.components.BorderContainer" since="4.0"> |
| </Alternative><Alternative owner="mx.containers:Box" replacement="spark.components.VGroup" since="4.0"> |
| </Alternative><Alternative owner="mx.containers:Box" replacement="spark.components.HGroup" since="4.0"> |
| </Alternative><styles><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:Box" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的上边框与其内容区域顶部之间的像素数目。默认值为 0。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingBottom" owner="mx.containers:Box" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的下边框与其内容区域底部之间的像素数目。默认值为 0。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:Box" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 6。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:Box" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 8。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="bottom,middle,top" inherit="no" name="verticalAlign" owner="mx.containers:Box" playerVersion="Flash9" type="String"> |
| <description> |
| 垂直对齐容器中的子项。可能值包括 <codeph>"top"</codeph>、<codeph>"middle"</codeph> 和 <codeph>"bottom"</codeph>。默认值为 <codeph>"top"</codeph>,但某些容器(如 ButtonBar、ControlBar、LinkBar 和 ToggleButtonBar)具有不同的默认值。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="no" name="horizontalAlign" owner="mx.containers:Box" playerVersion="Flash9" type="String"> |
| <description> |
| 水平对齐容器中的子容器。可能值包括 <codeph>"left"</codeph>、<codeph>"center"</codeph> 和 <codeph>"right"</codeph>。默认值为 <codeph>"left"</codeph>,但某些容器(如 ButtonBar 和 ToggleButtonBar)具有不同的默认值。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:Box></code> tag inherits all of the tag |
| attributes of its superclass, and adds the following tag attributes:</p> |
| |
| <p> |
| <pre> |
| <mx:Box |
| <strong>Properties</strong> |
| direction="vertical|horizontal" |
| <strong>Styles</strong> |
| horizontalAlign="left|center|right" |
| horizontalGap="8" |
| paddingBottom="0" |
| paddingTop="0" |
| verticalAlign="top|middle|bottom" |
| verticalGap="6" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:Box> |
| </pre> |
| </p> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| Halo Box 容器将其子项放在同一垂直列或同一水平行中。<codeph>direction</codeph> 属性确定使用垂直(默认)布局还是水平布局。 |
| |
| <p><b>注意:</b>Adobe 建议您,如果可能,请使用具有 HorizontalLayout 或 VerticalLayout 的 Spark 容器,而不使用 Halo Box 容器。</p> |
| |
| <p>Box 类是 VBox 和 HBox 类的基类。您可以使用 <codeph><mx:Box></codeph>、<codeph><mx:VBox></codeph> 和 <codeph><mx:HBox></codeph> 标签定义 Box 容器。</p> |
| |
| <p>Box 容器具有以下默认大小特性:</p> |
| <adobetable class="innertable"> |
| |
| |
| |
| <tgroup cols="2"><thead><row><entry>特征</entry><entry>说明</entry></row></thead><tbody><row> |
| <entry>默认大小</entry> |
| <entry><b>垂直框</b>高度足以容纳使用默认高度或明确显示的高度的所有子项、子项之间的垂直间隔以及容器的上下填充。宽度为最宽的子容器的默认宽度或明确指定的宽度与容器的左填充和右填充之和。<b>水平框</b>宽度足以容纳使用默认宽度的所有子项、子项之间的水平间隔以及容器的左右填充。高度为最高子容器的默认或明确指定的高度与容器的上下填充之和。 |
| </entry> |
| </row><row> |
| <entry>默认填充</entry> |
| <entry>上、下、左、右的值均为 0 像素。</entry> |
| </row></tbody></tgroup></adobetable> |
| |
| </apiDesc><example conref="SimpleBoxExample.mxml"><swfblock conref="examples/SimpleBoxExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.core.xml#Container"><linktext>mx.core.Container</linktext></link><link href="mx.containers.xml#HBox"><linktext>mx.containers.HBox</linktext></link><link href="mx.containers.xml#VBox"><linktext>mx.containers.VBox</linktext></link></related-links><apiConstructor id="mx.containers:Box:Box"><apiName>Box</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:Box:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算 Box 容器的默认大小、最小值以及最大值。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算 Box 容器的默认大小、最小值以及最大值。 |
| |
| <p>如果 Box 容器的 <codeph>direction</codeph> 属性设置为 <codeph>BoxDirection.HORIZONTAL</codeph>,则其 <codeph>measuredWidth</codeph> 属性是其所有子项的默认宽度之和加上边框粗细、左右填充以及各子项间的水平间距。<codeph>measuredHeight</codeph> 属性的值是其所有子项默认高度中的最大值与边框和填充空间之和。如果 Box 容器的 <codeph>direction</codeph> 属性设置为 <codeph>BoxDirection.VERTICAL</codeph>,这两个值将对调。</p> |
| |
| <p>Box 容器的 <codeph>minWidth</codeph> 和 <codeph>minHeight</codeph> 属性的计算过程类似,都是取子项的最小宽度和最小高度的组合。如果子项的 <codeph>width</codeph> 属性是一个百分比值,则 Box 容器的最小宽度等于其子项的 <codeph>minWidth</codeph> 属性值。如果子项的 <codeph>width</codeph> 尚未设置或设为固定值,则子项不能进行缩放,因此 Box 容器的最小宽度等于该子项的 <codeph>explicitWidth</codeph> 属性的值。子项最小高度的计算过程与此类似。</p> |
| |
| <p>不计算 Box 容器的 <codeph>maxWidth</codeph> 和 <codeph>maxHeight</codeph> 属性。假定 Box 容器不存在最大宽度和高度限制。</p> |
| |
| <p>上述所有值都是 Box 容器的<i>测量</i>宽度和高度。用户可以通过显式为下列属性提供值来覆盖测量值:</p> |
| |
| <ul> |
| <li><codeph>width</codeph></li> |
| <li><codeph>height</codeph></li> |
| <li><codeph>minWidth</codeph></li> |
| <li><codeph>minHeight</codeph></li> |
| <li><codeph>maxWidth</codeph></li> |
| <li><codeph>maxHeight</codeph></li> |
| </ul> |
| |
| <p>您不应直接调用 <codeph>measure()</codeph> 方法。Flex LayoutManager 会在合适的时间调用此方法。启动应用程序时,Flex LayoutManager 将首先尝试测量包括子项和父项在内的所有组件,然后将其设置为最终大小。</p> |
| |
| <p>此方法是在细分过程中使用的高级方法。如果覆盖此方法,则必须调用 <codeph>super.measure()</codeph> 方法或设置 <codeph>measuredHeight</codeph> 和 <codeph>measuredWidth</codeph> 属性,才能实现。您还可以选择设置下列属性:</p> |
| |
| <ul> |
| <li><codeph>measuredMinWidth</codeph></li> |
| <li><codeph>measuredMinHeight</codeph></li> |
| </ul> |
| |
| <p>这些属性对应于先前列出的布局属性,因此不再单独介绍。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Box:pixelsToPercent"><apiName>pixelsToPercent</apiName><shortdesc> |
| 用于将像素数目转换为相对于容器内容的百分比的方法。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>在此容器的当前布局条件下与 <codeph>pxl</codeph> 相等的百分比值。负值表明必须增大容器的体积以适应请求的大小。 |
| |
| </apiDesc><apiType value="Number"/></apiReturn><apiParam><apiItemName>pxl</apiItemName><apiType value="Number"/><apiDesc>需要转换为百分比值的像素数目。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 用于将像素数目转换为相对于容器内容的百分比的方法。 |
| |
| <p>只有在不更改容器大小或布局的情况下,百分比值才有效。调整大小和/或应用新布局后,此方法返回的值可能会失效。</p> |
| |
| <p>应用此方法的一个示例是隐藏组件后将该组件的大小还原为特定的像素数目。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:Box:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 设置 Box 容器中每个子项的大小和位置。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 设置 Box 容器中每个子项的大小和位置。 |
| |
| <p>要了解用于 Box 容器的布局算法,请假设 Box 容器的方向是水平的。</p> |
| |
| <p>Box 容器的所有子项并排放置在同一水平行上,每对相邻的子项之间相隔 <codeph>horizontalGap</codeph> 像素。最初,未设定明确指示的宽度值的子项的宽度设置为 <codeph>measuredWidth</codeph> 属性的值。</p> |
| |
| <p>如果子项的 <codeph>measuredWidth</codeph> 属性值之和大于或小于 Box 容器的宽度,并且其中部分子项的 <codeph>width</codeph> 属性为百分比值,则将调整这些子项的大小,直到 Box 正好可以容纳所有子项。但是,所有子项都不会缩至小于其 <codeph>minWidth</codeph> 属性值,或增至大于其 <codeph>maxWidth</codeph> 属性值。在增大(或缩小)子项的过程中,将根据子项的 <codeph>percentWidth</codeph> 按比例添加(或减小)多余的空间。例如,将 <codeph>percentWidth</codeph> 设为 40% 的子项所增加的大小是将 <codeph>percentWidth</codeph> 设置为 20% 的子项的两倍,直至填充了所有可用空间或达到了指定大小。</p> |
| |
| <p>在所有灵活子项都完成增减后,Flex 将检查所有子项的宽度之和是否符合 Box 容器的宽度。如果二者不相符,子项组将根据 Box 容器的 <codeph>horizontalAlign</codeph> 属性进行整体移动,以便子项与 Box 的左边缘对齐、与 Box 的右边缘对齐或者位于 Box 的中间部分。</p> |
| |
| <p>为确定每个子项的高度,Flex 将检查子项的 <codeph>height</codeph> 属性值。如果尚未设定 <codeph>height</codeph>,则子项高度将设为其 <codeph>measuredHeight</codeph> 值。如果 <codeph>height</codeph> 设为某个像素值,将使用该值。如果 <codeph>height</codeph> 设为百分比值,则子项的高度将增减为符合 Box 的指定高度百分比;前提是子项的高度不会缩至小于其 <codeph>minHeight</codeph> 属性值,或增至大于其 <codeph>maxHeight</codeph> 属性值。</p> |
| |
| <p>每个子项的垂直位置由 Box 容器的 <codeph>verticalAlign</codeph> 属性确定。所有子项都需要移动,以便与 Box 的顶部边缘或底部边缘对齐,或者位于 Box 的中间部分。</p> |
| |
| <p>如果 Box 容器的 <codeph>direction</codeph> 为 <codeph>vertical</codeph>,则规则相同,但宽度和高度将对调。子项将放在同一垂直列上。</p> |
| |
| <p>不应该直接调用此方法。Flex LayoutManager 会在合适的时间调用此方法。启动应用程序时,Flex LayoutManager 将对每个组件调用 <codeph>updateDisplayList()</codeph> 方法,从 Application 对象开始,依次向下。</p> |
| |
| <p>此方法是在细分过程中使用的高级方法。如果覆盖此方法,则应调用 <codeph>super.updateDisplayList()</codeph> 方法,并对各个子项调用 <codeph>move()</codeph> 和 <codeph>setActualSize()</codeph> 方法来实现此效果。要执行布局,您应该从 <codeph>unscaledWidth</codeph> 和 <codeph>unscaledHeight</codeph> 属性中获取此容器的大小,而不是从 <codeph>width</codeph> 和 <codeph>height</codeph> 属性中进行获取。<codeph>width</codeph> 和 <codeph>height</codeph> 属性与此容器的 <codeph>scaleX</codeph> 和 <codeph>scaleY</codeph> 属性值无关。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiValue id="mx.containers:Box:direction:get"><apiName>direction</apiName><shortdesc> |
| Box 容器设置其子项布局的方向。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="directionChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/><apiDefaultValue>BoxDirection.VERTICAL |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| Box 容器设置其子项布局的方向。可能的 MXML 值包括 <codeph>"horizontal"</codeph> 和 <codeph>"vertical"</codeph>。ActionScript 中的值可能为 <codeph>BoxDirection.HORIZONTAL</codeph> 和 <codeph>BoxDirection.VERTICAL</codeph>。 |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="mx.containers:FormItem"><apiName>FormItem</apiName><shortdesc> |
| FormItem 容器定义一个标签以及一个或多个水平或垂直排列的子容器。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion><Exclude kind="effect" name="focusOutEffect"/><Exclude kind="effect" name="focusInEffect"/><Exclude kind="style" name="focusThickness"/><Exclude kind="style" name="focusSkin"/><Exclude kind="style" name="focusBlendMode"/><Exclude kind="event" name="focusOut"/><Exclude kind="event" name="focusIn"/><Alternative owner="mx.containers:FormItem" replacement="spark.components.FormItem" since="4.5"> |
| </Alternative><styles><style format="Length" inherit="no" name="paddingTop" owner="mx.containers:FormItem" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的上边框与其内容区域的上边缘之间的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingRight" owner="mx.containers:FormItem" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的右边框与其内容区域的右边缘之间的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="paddingBottom" owner="mx.containers:FormItem" playerVersion="Flash9" type="Number"> |
| <description> |
| 容器的下边框与其内容区域的下边缘之间的像素数目。 |
| |
| </description> |
| <default>0 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="labelWidth" owner="mx.containers:FormItem" playerVersion="Flash9" type="Number"> |
| <description> |
| 表单标签的宽度。默认值为表单中最长标签的长度。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="labelStyleName" owner="mx.containers:FormItem" playerVersion="Flash9" type="String"> |
| <description> |
| 用于 FormItem 标签样式的 CSS 样式声明的名称。默认情况下,标签使用 FormItem 的可继承样式或由 FormItemLabel 声明的样式。应使用此样式代替 FormItemLabel。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style inherit="no" name="indicatorSkin" owner="mx.containers:FormItem" playerVersion="Flash9" type="Class"> |
| <description> |
| 指定要对所需字段指示符使用的外观。默认值为 Assets.swf 文件中的 "mx.containers.FormItem.Required" 符号。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="yes" name="indicatorGap" owner="mx.containers:FormItem" playerVersion="Flash9" type="Number"> |
| <description> |
| 表单项的标签和子组件之间的像素数目。 |
| |
| </description> |
| <default>14 |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style enumeration="left,center,right" inherit="no" name="horizontalAlign" owner="mx.containers:FormItem" playerVersion="Flash9" type="String"> |
| <description> |
| 水平对齐容器中的子容器。可能值包括 <codeph>"left"</codeph>、<codeph>"center"</codeph> 和 <codeph>"right"</codeph>。 |
| |
| </description> |
| <default>"left" |
| |
| </default> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="verticalGap" owner="mx.containers:FormItem" playerVersion="Flash9" type="Number"> |
| <description> |
| 垂直方向上各子项间的像素数目。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 6。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style><style format="Length" inherit="no" name="horizontalGap" owner="mx.containers:FormItem" playerVersion="Flash9" type="Number"> |
| <description> |
| 水平方向上各子代之间的像素数。默认值取决于组件类;如果没有覆盖该类的默认值,则默认值为 8。 |
| |
| </description> |
| |
| <playerversion>AIR 1.1 |
| </playerversion> |
| <prolog><asCustoms><langversion>3.0 |
| </langversion><productversion>Flex 3 |
| </productversion></asCustoms></prolog></style></styles></asMetadata><asCustoms><mxml><![CDATA[ |
| |
| <p>The <code><mx:FormItem></code> tag inherits all of the tag |
| attributes of its superclass, except <code>paddingLeft</code>, |
| and adds the following tag attributes:</p> |
| |
| <pre> |
| <mx:FormItem |
| <strong>Properties</strong> |
| direction="vertical|horizontal" |
| label="" |
| required="false|true" |
| |
| <strong>Styles</strong> |
| horizontalAlign="left|center|right" |
| horizontalGap="8" |
| indicatorGap="14" |
| indicatorSkin="<i>'mx.containers.FormItem.Required' symbol in Assets.swf</i>" |
| labelStyleName="" |
| labelWidth="<i>Calculated</i>" |
| paddingBottom="0" |
| paddingRight="0" |
| paddingTop="0" |
| verticalGap="6" |
| > |
| ... |
| <i>child tags</i> |
| ... |
| </mx:FormItem> |
| </pre> |
| |
| ]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>mx.core:Container</apiBaseClassifier></apiClassifierDef><apiDesc> |
| FormItem 容器定义一个标签以及一个或多个水平或垂直排列的子容器。子容器可以是控件,也可以是其他容器。一个 Form 容器可以容纳多个 FormItem 容器。 |
| |
| </apiDesc><example conref="FormExample.mxml"><swfblock conref="examples/FormExample.swf"/></example></apiClassifierDetail><related-links><link href="mx.containers.xml#Form"><linktext>mx.containers.Form</linktext></link><link href="mx.containers.xml#FormItemDirection"><linktext>mx.containers.FormItemDirection</linktext></link><link href="mx.containers.xml#FormHeading"><linktext>mx.containers.FormHeading</linktext></link><link href="mx.controls.xml#FormItemLabel"><linktext>mx.controls.FormItemLabel</linktext></link></related-links><apiConstructor id="mx.containers:FormItem:FormItem"><apiName>FormItem</apiName><shortdesc> |
| 构造函数。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc> |
| 构造函数。 |
| |
| </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="mx.containers:FormItem:protected:measure"><apiName>measure</apiName><shortdesc> |
| 计算 FormItem 的首选大小、最小大小和最大大小。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc> |
| 计算 FormItem 的首选大小、最小大小和最大大小。有关 <codeph>measure()</codeph> 方法的详细信息,请参阅 <codeph>UIComponent.measure()</codeph> 方法。 |
| |
| <p><codeph>FormItem.measure()</codeph> 方法首先确定要使用的列的数目。如果 <codeph>direction</codeph> 属性为 <codeph>FormItemDirection.HORIZONTAL</codeph>,则在可能的情况下,所有控件都将放置于一行中。如果一行中无法容纳所有控件,则它们将分成两列。如果分成两列不起作用,则使用一列。如果 <codeph>direction</codeph> 为 <codeph>FormItemDirection.VERTICAL</codeph>,则所有控件都将放置到一列(如 <codeph>VBox</codeph>)。</p> |
| |
| <p>FormItem 包含两个区域:标签区域和控件区域。无论控件的方向如何,标签的大小都是一样的。控件区域的大小取决于使用的行数和列数。</p> |
| |
| <p>标签区域的宽度取决于 <codeph>labelWidth</codeph> 样式属性。如果此属性为 <codeph>undefined</codeph>(默认设置),则使用父 Form 容器中最大标签的宽度。</p> |
| |
| <p>如果所有子容器均位于一行,则控件区域的宽度为所有子容器的宽度与子容器之间的 <codeph>horizontalGap</codeph> 间距的总和。</p> |
| |
| <p>如果所有子容器均位于一列,则控件区域的宽度为最宽子容器的宽度。</p> |
| |
| <p>如果子容器位于多行多列上,则列宽为最宽子容器的宽度,控件区域的宽度为列宽与列数的乘积再加上各列之间的 <codeph>horizontalGap</codeph> 间距。</p> |
| |
| <p>将 <codeph>measuredWidth</codeph> 设置为标签区域的宽度、控件区域的宽度和 <codeph>indicatorGap</codeph> 样式属性值这三者之和。还添加了 <codeph>paddingLeft</codeph> 和 <codeph>paddingRight</codeph> 样式属性值以及边框宽度。</p> |
| |
| <p>将 <codeph>measuredHeight</codeph> 设置为子容器所有行的首选高度与各子容器之间的 <codeph>verticalGap</codeph> 间距的总和。还添加了 <codeph>paddingTop</codeph> 和 <codeph>paddingBottom</codeph> 样式属性以及边框高度。</p> |
| |
| <p>将 <codeph>measuredMinWidth</codeph> 设置为标签区域的宽度、控件区域的最小宽度和 <codeph>indicatorGap</codeph> 样式属性值这三者之和。还添加了 <codeph>paddingLeft</codeph> 和 <codeph>paddingRight</codeph> 样式属性值以及边框宽度。</p> |
| |
| <p>将 <codeph>measuredMinHeight</codeph> 设置为子容器所有行的最小高度与各个子容器之间的 <codeph>verticalGap</codeph> 间距的总和。还添加了 <codeph>paddingTop</codeph> 和 <codeph>paddingBottom</codeph> 样式属性以及边框高度。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiOperation id="mx.containers:FormItem:protected:updateDisplayList"><apiName>updateDisplayList</apiName><shortdesc> |
| 通过设置此容器的子容器的位置和大小来响应大小更改。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="protected"/><apiIsOverride/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>unscaledWidth</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 <codeph>scaleX</codeph> 属性值。 |
| |
| </apiDesc></apiParam><apiParam><apiItemName>unscaledHeight</apiItemName><apiType value="Number"/><apiDesc>指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 <codeph>scaleY</codeph> 属性值。 |
| |
| </apiDesc></apiParam></apiOperationDef><apiDesc> |
| 通过设置此容器的子容器的位置和大小来响应大小更改。有关 <codeph>updateDisplayList()</codeph> 方法的更多信息,请参阅 <codeph>UIComponent.updateDisplayList()</codeph> 方法。 |
| |
| <p>有关如何定位 FormItem 控件的详细信息,请参阅 <codeph>FormItem.measure()</codeph> 方法。</p> |
| |
| <p>根据 <codeph>textAlign</codeph> 样式属性对齐标签区域中的标签。表单中的所有标签互相对齐。</p> |
| |
| <p>如果将 <codeph>required</codeph> 属性设置为 <codeph>true</codeph>,则将在标签和控件之间放置用于指示该字段为必填字段的符号。</p> |
| |
| <p>如 <codeph>measure()</codeph> 方法的文档中的描述,将以列的形式对控件进行定位。<codeph>horizontalAlign</codeph> 样式属性可确定将控件水平放置到的位置。</p> |
| |
| <p>如果将 <codeph>direction</codeph> 属性设置为 <codeph>"vertical"</codeph>,则任何未指定 <codeph>width</codeph> 的子容器将均使用与控件区域 1/4 宽度最接近的 <codeph>measuredWidth</codeph>。这是为了避免控件的右边缘出现锯齿。</p> |
| |
| <p>此方法在调用 <codeph>super.updateDisplayList()</codeph> 方法后才会进行其他操作。</p> |
| |
| </apiDesc></apiOperationDetail></apiOperation><apiValue id="mx.containers:FormItem:direction:get"><apiName>direction</apiName><shortdesc> |
| FormItem 子组件的方向。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="directionChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/><apiDefaultValue>FormItemDirection.VERTICAL |
| </apiDefaultValue></apiValueDef><apiDesc> |
| FormItem 子组件的方向。MXML 值可以是 <codeph>"vertical"</codeph>,也可以是 <codeph>"horizontal"</codeph>。默认的 MXML 值是 <codeph>"vertical"</codeph>。ActionScript 值可以是 <codeph>FormItemDirection.VERTICAL</codeph>,也可以是 <codeph>FormItemDirection.HORIZONTAL</codeph>。 |
| |
| <p>如果 <codeph>direction</codeph> 为 <codeph>"vertical"</codeph>,则 FormItem 的子项将垂直堆叠到 FormItem 标签的右侧。如果 <codeph>direction</codeph> 为 <codeph>"horizontal"</codeph>,则子项将放置于一行中(如果可能)或两个同等大小的列中。</p> |
| |
| <p>如果需要对 FormItem 子项的布局进行更多控制,您可以使用容器(如 Grid 或 Tile)作为 FormItem 的直属子项并将所需控件放入其中。</p> |
| |
| </apiDesc></apiValueDetail><related-links><link href="mx.containers.xml#FormItemDirection"><linktext>mx.containers.FormItemDirection</linktext></link></related-links></apiValue><apiValue id="mx.containers:FormItem:itemLabel:get"><apiName>itemLabel</apiName><shortdesc> |
| 显示 FormItem 标签的 FormItemLabel 子组件的只读引用。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="itemLabelChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>mx.controls:Label</apiValueClassifier></apiValueDef><apiDesc> |
| 显示 FormItem 标签的 FormItemLabel 子组件的只读引用。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:FormItem:label:get"><apiName>label</apiName><shortdesc> |
| FormItem 文本标签。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiIsOverride/><apiProperty isBindable="true" name="labelChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="String"/><apiDefaultValue>"" |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| FormItem 文本标签。此标签出现在表单项的子组件的左侧。标签的位置由 <codeph>textAlign</codeph> 样式属性控制。 |
| |
| </apiDesc></apiValueDetail></apiValue><apiValue id="mx.containers:FormItem:required:get"><apiName>required</apiName><shortdesc> |
| 如果为 true,将显示一个指示符以指示 FormItem 子项要求用户进行输入。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.1"/><apiTool description="" name="Flex" version="3"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="requiredChanged"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Boolean"/><apiDefaultValue>false |
| |
| </apiDefaultValue></apiValueDef><apiDesc> |
| 如果为 <codeph>true</codeph>,将显示一个指示符以指示 FormItem 子项要求用户进行输入。如果为 <codeph>false</codeph>,则不会显示指示符。 |
| |
| <p>此属性仅控制指示符显示。如果您需要输入验证,必须在子项上附加验证程序。</p> |
| |
| </apiDesc></apiValueDetail></apiValue></apiClassifier></apiPackage> |