<mx:Canvas>
tag inherits all the tag attributes
of its superclass. Use the following syntax:
<mx:Canvas> ... child tags ... </mx:Canvas>]]>
メモ: 可能な場合は、Halo Canvas コンテナではなく、Spark コンテナを BasicLayout と共に使用することをお勧めします。
Canvas レイアウトコンテナの子は、それぞれの推奨されている幅および高さに設定されます。 子の
Canvas コンテナ内でパーセントによるサイズ指定を使用している場合、コンポーネントの一部が重複します。 これが必要な効果でない場合は、コンポーネントの位置とサイズを慎重に計画してください。
Canvas コンテナには、次のデフォルトサイズ設定属性があります。
Canvas の
Canvas コンテナの
Canvas コンテナの
前述の値はすべて、Canvas の計算された幅と高さです。 以下のプロパティの値を明示的に指定することにより、計算された値をオーバーライドできます。
このメソッドを直接呼び出すことは避けてください。 Flex LayoutManager が適切なタイミングで呼び出します。 Flex LayoutManager は、アプリケーションの起動時に、子から親に至るすべてのコンポーネントを測定してから、それぞれに最終的なサイズを設定しようとします。
これは、サブクラスの処理で使用する高度なメソッドです。 このメソッドをオーバーライドする場合は、実装で
Canvas は、子の位置を変更しません。 それぞれの子は、その
Canvas は、各子の幅と高さをその子の
このメソッドを直接呼び出すことは避けてください。 Flex LayoutManager が適切なタイミングで呼び出します。 Flex LayoutManager は、アプリケーションの起動時に、Application オブジェクトから始まって下方向にある全コンポーネントに対して
これは、サブクラスの処理で使用する高度なメソッドです。 このメソッドをオーバーライドする場合は、実装で
<mx:DividedBox>
tag inherits all of the tag
attributes of its superclass, and adds the following tag attributes:
<mx:DividedBox Properties liveDragging="false|true" resizeToContent="false|true" Styles dividerAffordance="6" dividerAlpha="0.75" dividerColor="0x6F7777" dividerSkin="'mx.skins.BoxDividerSkin' symbol in Assets.swf" dividerThickness="3" horizontalDividerCursor="'mx.skins.cursor.HBoxDivider' symbol in Assets.swf" verticalDividerCursor="'mx.skins.cursor.VBoxDivider' symbol in Assets.swf" Events dividerPress="No default" dividerDrag="No default" dividerRelease="No default" > ... child tags ... </mx:DividedBox>]]>
DividedBox クラスは、よく使用される HDividedBox クラスおよび VDividedBox クラスの基本クラスです。
DividedBox コンテナの
DividedBox、HDividedBox、または VDividedBox コンテナには、次のデフォルトサイズ設定特定があります。
<mx:ApplicationControlBar>
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
backgroundColor
style for an ApplicationControlBar
container.
<mx:ApplicationControlBar Properties dock="false|true" Styles fillAlphas="[0, 0]" fillColors="[0xFFFFFF, 0xFFFFFF]" > ... child tags ... </mx:ApplicationControlBar>]]>
メモ: Spark Application コンテナでは、ApplicationControlBar コンテナはサポートされていません。この機能を追加するには、Spark Application コンテナのスキンを変更します。
ApplicationControlBar コンテナは、次のいずれかのモードに設定できます。
ApplicationControlBar コンテナには、次のデフォルトサイズ設定属性があります。
<mx:HDividedBox>
tag inherits all of the tag
attributes of its superclass except direction
and adds
no new tag attributes.
]]>HDividedBox コンテナには、次のデフォルトサイズ設定属性があります。
<mx:Grid>
tag inherits all of the tag
attributes of its superclass, except the Box.direction
property, and adds the following tag attributes:
<mx:Grid Styles horizontalGap="8" verticalGap="6" > ... These child tags are examples only: <mx:GridRow id="row1"> <mx:GridItem rowSpan="1" colSpan="1"> <mx:Button label="Button 1"/> </mx:GridItem> ... </mx:GridRow> ... </mx:Grid>]]>
ある 1 行に含まれるセルの高さはすべて同じですが、行ごとに高さを変えることができます。 1 つの列に含まれるセルの幅はすべて同じですが、列ごとに幅を変えることができます。 Grid コンテナの行または列ごとに、異なるセル数を定義できます。 また、1 つのセルがコンテナの複数の列または行にまたがることもできます。
Grid、GridRow および GridItem コンテナには、以下のデフォルトサイズ設定属性があります。
このメソッドは、サブクラスの処理で使用する高度なメソッドです。直接呼び出すことは避けてください。
Grid コンテナがその寸法を計算する方法について理解するため、すべての GridItem コンテナの
GridItem コンテナの
ただし、GridItem コンテナの
前述の値はすべて、Grid の計算された幅と高さです。 以下のプロパティの値を明示的に指定することにより、測定値をオーバーライドできます。
このメソッドをオーバーライドする場合は、実装で
どちらのプロパティも前述のレイアウトプロパティに対応しているため、これ以上取り上げません。
このメソッドは、サブクラスの処理で使用する高度なメソッドです。直接呼び出すことは避けてください。
Grid コンテナは、VBox コンテナと同じレイアウト規則に従います。 GridRow コンテナの位置とサイズの計算方法は、VBox コンテナが子の位置とサイズを決める場合と同一です。 同様に、GridRow コンテナが GridItem コンテナの位置を決めるときに使用するレイアウトアルゴリズムは、HBox コンテナが使用するアルゴリズムと似ています。
唯一の違いは、GridRow コンテナの場合、子の位置とサイズがすべて同一に設定されるように (Grid コンテナの列が一列に並ぶように)、すべてのコンテナ同士が協調することです。
このメソッドをオーバーライドする場合は、実装で
<mx:TabNavigator>
tag inherits all of the
tag attributes of its superclass,
and adds the following tag attributes:
<mx:TabNavigator Styles fillAlphas="[0.60, 0.40, 0.75, 0.65]" fillColors="[0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]" firstTabStyleName="Value of the]]>tabStyleName
property" focusAlpha="0.4" focusRoundedCorners="tl tr bl br" horizontalAlign="left|center|right" horizontalGap="-1" lastTabStyleName="Value of thetabStyleName
property" selectedTabTextStyleName="undefined" tabHeight="undefined" tabOffset="0" tabStyleName="Name of CSS style declaration that specifies styles for the tabs" tabWidth="undefined" > ... child tags ... </mx:TabNavigator>
メモ:MX ナビゲーターコンテナの直接の子は、MX コンテナ、MX レイアウトか MX ナビゲーターのどちらかのコンテナ、または Spark NavigatorContent コンテナであることが必要です。Spark NavigatorContent コンテナ以外のコントロールまたは Spark コンテナをナビゲーター内で直接ネストできません。子 MX コンテナの子であることが必要です。
ViewStack コンテナと同様に、TabNavigator コンテナには子コンテナのコレクションが含まれます。一度に表示される子は 1 つのみです。 TabNavigator コンテナの上部には TabBar コンテナが自動的に作成され、これにより各子コンテナに 1 つのタブが対応します。 各タブには固有のラベルとアイコンを割り当てることができます。 ユーザーがタブをクリックすると、対応する子コンテナが、TabNavigator コンテナの選択された子として表示されます。
現在表示されている子コンテナを変更するときには、非表示にするコンテナの
TabNavigator でタブの外観を定義するには、次の例に示すように、Tab タイプセレクターでスタイルのプロパティを定義します。
<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>
Tab タイプセレクターでは、非表示の mx.controls.tabBarClasses.Tab クラスの値を定義します。 Tab タイプセレクターのデフォルト値は、"defaults.css" ファイルで定義されています。
また、次の例のように、
<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>
TabNavigator コンテナには、次のデフォルトサイズ設定属性があります。
TabNavigator コンテナは、次の 2 つの点を除き、
TabNavigator コンテナの上部には、TabBar コンテナが配置されています。 TabBar の幅は TabNavigator の幅に設定され、TabBar の高さは
TabNavigator コンテナは、ViewStack コンテナと同じロジックを使用して、子コンテナの位置とサイズを TabBar の下に設定します。
<mx:HBox>
tag inherits all of the tag
attributes of its superclass, except direction
, and adds
no new tag attributes.
]]>メモ: 可能な場合は、Halo HBox コンテナではなく、Spark コンテナを HorizontalLayout と共に使用することをお勧めします。
HBox コンテナには、次のデフォルトサイズ設定属性があります。
<mx:VBox>
tag inherits all of the tag
attributes of its superclass, except direction
, and adds
no new tag attributes.
]]>メモ: 可能な場合は、Halo VBox コンテナではなく、Spark コンテナを VerticalLayout と共に使用することをお勧めします。
VBox コンテナには、次のデフォルトサイズ設定属性があります。
<mx:TitleWindow>
tag inherits all of the tag
attributes of its superclass, and adds the following tag attributes:
<mx:TitleWindow Properties showCloseButton="false|true" Styles closeButtonDisabledSkin="'CloseButtonDisabled' symbol in Assets.swf" closeButtonDownSkin="'CloseButtonDown' symbol in Assets.swf" closeButtonOverSkin="'CloseButtonOver' symbol in Assets.swf" closeButtonUpSkin="'CloseButtonUp' symbol in Assets.swf" Events close="No default" > ... child tags ... />]]>
TitleWindow コンテナには、次のデフォルトサイズ設定属性があります。
<mx:FormHeading>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<mx:FormHeading Properties label="" Styles 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="Calculated" leading="2" paddingLeft="0" paddingRight="0" paddingTop="0" textAlign="Calculated" textDecoration="none|underline" textIndent="0" />]]>
<mx:Accordion>
tag inherits all of the
tag attributes of its superclass, with the exception of scrolling-related
attributes, and adds the following tag attributes:
<mx:Accordion Properties headerRenderer="IFactory" historyManagementEnabled="true|false" resizeToContent="false|true" selectedChild"A reference to the first child" selectedIndex="undefined" Styles headerHeight="depends on header font styles" headerStyleName="No default" horizontalGap="8" openDuration="250" openEasingFunction="undefined" paddingBottom="-1" paddingTop="-1" textRollOverColor="0xB333C" textSelectedColor="0xB333C" verticalGap="-1" Events change="No default" > ... child tags ... </mx:Accordion>]]>
メモ:MX ナビゲーターコンテナの直接の子は、MX コンテナ、MX レイアウトか MX ナビゲーターのどちらかのコンテナ、または Spark NavigatorContent コンテナであることが必要です。Spark NavigatorContent コンテナ以外のコントロールまたは Spark コンテナをナビゲーター内で直接ネストできません。子 MX コンテナの子であることが必要です。
Accordion コンテナは ViewStack コンテナを拡張しませんが、
Accordion コンテナには、次のデフォルトサイズ設定属性があります。
メモ: このプロパティは ActionScript ステートメントでのみ設定できます。MXML では設定できません。
<mx:ControlBar>
tag inherits all the tag
attributes but adds no additional attributes:
<mx:ControlBar> ... child tags ... </mx:ControlBar>]]>
メモ: Spark Panel コンテナでは、ControlBar コンテナはサポートされていません。この機能を追加するには、Spark Panel コンテナのスキンを変更します。
ControlBar は、背景およびデフォルトのスタイルプロパティを持つ Box です。
ControlBar コンテナには、次のデフォルトサイズ設定属性があります。
<mx:GridItem>
tag must be a child of the
<GridRow>
tag, which defines a grid row.
The <mx:GridItem>
container inherits the
tag attributes of its superclass, and adds the following tag attributes.
<mx:Grid> <mx:GridRow> <mx:GridItem rowSpan="1" colSpan="1"> child components </mx:GridItem> ... </mx:GridRow> ... </mx:Grid>]]>
GridItem コンテナには、次のデフォルトサイズ設定属性があります。
<mx:Panel>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<mx:Panel Properties layout="vertical|horizontal|absolute" status="" title="" titleIcon="null" Styles borderAlpha="0.4" borderThicknessBottom="NaN" borderThicknessLeft="10" borderThicknessRight="10" borderThicknessTop="2" controlBarStyleName="null" cornerRadius="4" dropShadowEnabled="true|false" footerColors="null" headerColors="null" headerHeight="Based on style of title" 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" Effects resizeEndEffect="Dissolve" resizeStartEffect="Dissolve" > ... child tags ... </mx:Panel>]]>
メモ: 可能な場合は、Halo Panel コンテナではなく、Spark Panel コンテナを使用することをお勧めします。
Panel コンテナには、次のデフォルトサイズ設定属性があります。
<mx:Tile>
tag inherits all of the tag attributes
of its superclass, and adds the following tag attributes:
<mx:Tile Properties direction="horizontal|vertical" tileHeight="NaN" tileWidth="NaN" Sttles horizontalAlign="left|center|right" horizontalGap="8" paddingBottom="0" paddingTop="0" verticalAlign="top|middle|bottom" verticalGap="6" > ... child tags ... </mx:Tile>]]>
メモ: 可能な場合は、Halo Tile コンテナではなく、Spark コンテナを TileLayout と共に使用することをお勧めします。
Tile コンテナには、次のデフォルトサイズ設定属性があります。
このメソッドでは、最初に各タイルセルのサイズを計算します。 セルサイズの決定方法の詳細については、
子がある Tile コンテナの測定サイズは、行数と列数が等しい N × N のグリッドでセルを表示するのに必要なサイズに、Tile コンテナのパディングおよび境界線を加えたサイズになります。 ただし、次のように特殊な事例もあります。
子がない場合、測定サイズはパディングおよび境界線を表示するのに必要な大きさになります。
子がある Tile コンテナの最小測定サイズは、1 つのタイルセルにパディングおよび境界線を加えたサイズになります。 子がない場合、最小測定サイズはパディングおよび境界線を表示するのに必要な大きさになります。
このメソッドは、Tile コンテナのコンテンツ領域内(パディングより内側の領域)にある均等なサイズのセルで構成される格子状のグリッド内に子を配置します。 セルサイズの決定方法の詳細については、
セル同士の間隔は、
子を並べていく方向は、
子に
最初の子は、常に Tile コンテナの左上に配置されます。
<mx:VDividedBox>
tag inherits all of the tag
attributes of its superclass, except direction
, and adds
no new tag attributes.
]]>VDividedBox コンテナには、次のデフォルトサイズ設定属性があります。
<mx:Form>
tag inherits all the tag
attributes of its superclass and adds the following tag attributes:
<mx:Form Styles horizontalGap="8" indicatorGap="14" labelWidth="Calculated" paddingBottom="16" paddingTop="16" verticalGap="6" > ... child tags ... </mx:Form>]]>
次の表に、Flex でフォームを作成するために使用するコンポーネントを示します。
幅がパーセント値に設定された子は、Form コンテナの指定されたパーセント値まで水平方向に拡大されます。それ以外の子は、それぞれの
このメソッドは、何を実行する前にも
<mx:ViewStack>
tag inherits the
tag attributes of its superclass, with the exception of scrolling-related
attributes, and adds the following tag attributes:
<mx:ViewStack Properties historyManagementEnabled="false|true" resizeToContent="false|true" selectedIndex="0" Styles horizontalGap="8" paddingBottom="0" paddingTop="0" verticalGap="6" Events change="No default" > ... child tags ... </mx:ViewStack>]]>
メモ:MX ナビゲーターコンテナの直接の子は、MX コンテナ、MX レイアウトか MX ナビゲーターのどちらかのコンテナ、または Spark NavigatorContent コンテナであることが必要です。Spark NavigatorContent コンテナ以外のコントロールまたは Spark コンテナをナビゲーター内で直接ネストできません。子 MX コンテナの子であることが必要です。
ViewStack コンテナでは、現在表示される子コンテナを選択するためのユーザーインターフェイスが提供されません。 通常、このコンテナの
ViewStack コンテナより複雑な、TabNavigator コンテナや Accordion コンテナなどのナビゲーターコンテナを使用することもできます。 これらのコンテナは、子コンテナのコレクションを含むだけでなく、子の間を移動するための固有のユーザーインターフェイスコントロールを提供します。
現在表示されている子コンテナを変更するときには、非表示にするコンテナの
ViewStack コンテナには、次のデフォルトサイズ設定属性があります。
ViewStack コンテナのデフォルトサイズは、現在選択されている子のデフォルトサイズにパディングおよび境界線を加えたサイズになります。 ViewStack コンテナに子がない場合には、デフォルトサイズはパディングおよび境界線だけを表示するのに必要な大きさになります。
ViewStack コンテナの最小サイズは、現在選択されている子の最小サイズにパディングおよび境界線を加えたサイズになります。 ViewStack コンテナに子がない場合、最小サイズはパディングと境界線だけを表示するのに必要な大きさです。
このメソッドでは、ViewStack コンテナの最大サイズは変更されず、無制限のままになります。
一度に表示されるのは 1 つの子のみであるため、ViewStack コンテナはその子の位置とサイズのみを設定します。
選択されている子は、ViewStack コンテナのパディングと境界線のスペースを空けて、ViewStack コンテナの左上隅に配置されます。
選択されている子の
メモ: このプロパティは ActionScript ステートメントでのみ設定できます。MXML では設定できません。
メモ:ViewStack コンテナに新しい子を追加すると、選択した子がそのまま選択されるよう、
<mx:GridRow>
must be a child of the
<mx:Grid>
tag, and has one or more child
<mx:GridItem>
tags that define the grid cells.
The <mx:GridRow>
container inherits the
tag attributes of its superclass, and adds the following tag attributes:
<mx:Grid> <mx:GridRow Styles horizontalAlign="left|center|right" verticalAlign="top|middle|bottom" > <mx:GridItem child components </mx:GridItem> ... </mx:GridRow> ... </mx:Grid>]]>
GridRow コンテナには、次のデフォルトサイズ設定属性があります。
このメソッドを直接呼び出すことは避けてください。 Flex LayoutManager が適切なタイミングで呼び出します。 Flex LayoutManager は、アプリケーションの起動時に、ルートから始まって下方向にある全コンポーネントに対して
これは、サブクラスの処理で使用する高度なメソッドです。 このメソッドをオーバーライドする場合は、実装で
<mx:FormItem>
tag inherits all of the tag
attributes of its superclass, except paddingLeft
,
and adds the following tag attributes:
<mx:FormItem Properties direction="vertical|horizontal" label="" required="false|true" Styles horizontalAlign="left|center|right" horizontalGap="8" indicatorGap="14" indicatorSkin="'mx.containers.FormItem.Required' symbol in Assets.swf" labelStyleName="" labelWidth="Calculated" paddingBottom="0" paddingRight="0" paddingTop="0" verticalGap="6" > ... child tags ... </mx:FormItem>]]>
FormItem には、ラベル領域とコントロール領域の 2 つの領域が含まれてます。 ラベルのサイズは、コントロールの方向にかかわりなく同一です。 コントロール領域のサイズは、使用される行および列の数によって異なります。
ラベル領域の幅は、
すべての子が 1 行に配置されている場合、コントロール領域の幅は、すべての子の幅に、子同士の
子が 1 列に配置されている場合、コントロール領域の幅は最も広い子の幅になります。
子が複数の行および列に配置されている場合、最も広い子の幅が列幅になり、コントロール領域の幅は、列幅に列数を掛けた値に、各列間の
FormItem コントロールの位置を設定する方法については、
ラベルは
コントロールは、
このメソッドは、何を実行する前にも
FormItem の子のレイアウトをさらに制御する必要がある場合は、FormItem の直接の子として Grid や Tile などのコンテナを使用し、このコンテナの内部に必要なコントロールを配置します。
このプロパティは、インジケーターの表示のみを制御します。 入力を検証する必要がある場合は、子に検証を組み込む必要があります。
<mx:Box>
tag inherits all of the tag
attributes of its superclass, and adds the following tag attributes:
<mx:Box Properties direction="vertical|horizontal" Styles horizontalAlign="left|center|right" horizontalGap="8" paddingBottom="0" paddingTop="0" verticalAlign="top|middle|bottom" verticalGap="6" > ... child tags ... </mx:Box>]]>
メモ: 可能な場合は、Halo Box コンテナではなく、Spark コンテナを HorizontalLayout または VerticalLayout と共に使用することをお勧めします。
Box クラスは、VBox と HBox の基本クラスです。 Box コンテナを定義するには、
Box コンテナには、次のデフォルトサイズ設定属性があります。
Box コンテナの
Box コンテナの
Box コンテナの
前述の値はすべて、Box コンテナの計算された幅と高さです。 以下のプロパティの値を明示的に指定することにより、測定値をオーバーライドできます。
これは、サブクラスの処理で使用する高度なメソッドです。 このメソッドをオーバーライドする場合は、実装で
どちらのプロパティも前述のレイアウトプロパティに対応しているため、これ以上取り上げません。
パーセント値は、コンテナのサイズまたはレイアウトが変更されない間のみ適切です。 サイズやレイアウトを変更すると、このメソッドから返される値が最新のものではなくなることがあります。
このメソッドの使用例として、コンポーネントを非表示にした後、そのサイズを特定のピクセル数に復元することなどが考えられます。
Box コンテナのレイアウトアルゴリズムを理解するために、ここでは Box コンテナの方向が水平であると仮定します。
Box コンテナの子すべてが単一の水平行に隣り合って配置されており、隣接する 2 つの子の間には
子の
フレキシブルなすべての子が増大または縮小した後、子の幅の合計が Box コンテナの幅と一致するかどうかがチェックされます。 一致しない場合には、子が Box の左端、右端、または中央揃えに整列されるように、子のグループ全体が Box コンテナの
子の高さを決定するために、Flex は子の
子の垂直方向の位置は、Box コンテナの
Box コンテナの
このメソッドを直接呼び出すことは避けてください。 Flex LayoutManager が適切なタイミングで呼び出します。 Flex LayoutManager は、アプリケーションの起動時に、Application オブジェクトから始まって下方向にある全コンポーネントに対して
これは、サブクラスの処理で使用する高度なメソッドです。 このメソッドをオーバーライドする場合は、実装で