blob: e647a1ba33befcca9f5a2b3bfe0dc473e3ac1e46 [file] [log] [blame]
<?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="spark.layouts"><apiName>spark.layouts</apiName><apiDetail/><apiClassifier id="spark.layouts:ViewMenuLayout"><apiName>ViewMenuLayout</apiName><shortdesc>
ViewMenuLayout クラスでは、ViewMenu コンテナのレイアウトが定義されています。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="2.5"/><apiTool description="" name="Flex" version="4.5"/></apiVersion></asMetadata><asCustoms><mxml><![CDATA[
<p>The <code>&lt;s:ViewMenuLayout&gt;</code> tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:</p>
<pre>
&lt;s:ViewMenuLayout
<strong>Properties</strong>
horizontalGap="2"
requestedMaxColumnCount="3"
verticalGap="2"
/&gt;
</pre>
]]></mxml></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>spark.layouts.supportClasses:LayoutBase</apiBaseClassifier></apiClassifierDef><apiDesc>
ViewMenuLayout クラスでは、ViewMenu コンテナのレイアウトが定義されています。メニューには、メニューアイテムの数に応じて、複数の行を表示できます。
<p><codeph>requestedMaxColumnCount</codeph> プロパティでは、1 行のメニューアイテムの最大数が定義されています。 デフォルトでは、このプロパティは 3 に設定されます。</p>
<p>ViewMenuLayout クラスでは、レイアウトが次のように定義されています。 </p>
<ul>
<li>3 個以下のメニューアイテムを定義する場合に、<codeph>requestedMaxColumnCount</codeph> プロパティにデフォルト値の 3 が格納されいてる場合には、メニューアイテムは 1 行に表示されます。 各メニューアイテムは、同じサイズになります。
<p>4 個以上のメニューアイテム、つまり、<codeph>requestedMaxColumnCount</codeph> プロパティの指定よりも多いメニューアイテムを定義する場合、ViewMenu コンテナは複数の行を作成します。</p></li>
<li>メニューアイテムの数が <codeph>requestedMaxColumnCount</codeph> プロパティで割り切れる場合は、各行に同じ数のメニューアイテムが格納されます。 各メニューアイテムは、同じサイズになります。
<p>例えば、<codeph>requestedMaxColumnCount</codeph> プロパティがデフォルト値の 3 に設定されている場合に、6 個のメニューアイテムを定義したとします。 メニューには 2 行が表示され、各行には 3 個のメニューアイテムが表示されます。 </p></li>
<li>メニューアイテムの数が <codeph>requestedMaxColumnCount</codeph> プロパティで割り切れない場合は、行に格納されるメニューアイテムの数が異なる場合があります。 メニューアイテムのサイズは行のメニューアイテムの数によって異なります。
<p>例えば、<codeph>requestedMaxColumnCount</codeph> プロパティがデフォルト値の 3 に設定されている場合に、8 個のメニューアイテムを定義したとします。 メニューには 3 行が表示されます。 最初の行には 2 個のメニューアイテムが表示されます。 2 番目と 3 番目の行には、それぞれ 3 個のアイテムが表示されます。 </p></li>
</ul>
<p>独自のレイアウトクラスを作成して、メニューに対する独自のカスタムレイアウトを作成できます。デフォルトでは、spark.skins.mobile.ViewMenuSkin クラスが ViewMenu コンテナのスキンを定義します。 カスタマイズされた ViewMenuLayout クラスを ViewMenu コンテナに適用するには、ViewMenu コンテナの新しいスキンクラスを定義します。 </p>
<p>ViewMenuSkin クラスには、<codeph>contentGroup</codeph> という名前の Group コンテナの定義が含まれます。次に例を示します。</p>
<pre>
&lt;s:Group id="contentGroup" left="0" right="0" top="3" bottom="2"
minWidth="0" minHeight="0">
&lt;s:layout>
&lt;s:ViewMenuLayout horizontalGap="2" verticalGap="2" id="contentGroupLayout"
requestedMaxColumnCount="3" requestedMaxColumnCount.landscapeGroup="6"/>
&lt;/s:layout>
&lt;/s:Group></pre>
<p>カスタマイズされた ViewMenuLayout クラスを適用するには、<codeph>contentGroup</codeph> という名前のコンテナをスキンクラスに定義する必要があります。 そのコンテナでは <codeph>layout</codeph> プロパティを使用して、カスタマイズされたレイアウトクラスを指定します。 </p>
</apiDesc></apiClassifierDetail><related-links><link href="spark.components.xml#ViewMenu"><linktext>spark.components.ViewMenu</linktext></link><link href="spark.components.xml#ViewMenuItem"><linktext>spark.components.ViewMenuItem</linktext></link><link href="" invalidHref="spark.skins.mobile.ViewMenuSkin.xml"><linktext>spark.skins.mobile.ViewMenuSkin</linktext></link></related-links><apiConstructor id="spark.layouts:ViewMenuLayout:ViewMenuLayout"><apiName>ViewMenuLayout</apiName><shortdesc>
コンストラクターです。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="2.5"/><apiTool description="" name="Flex" version="4.5"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc>
コンストラクターです。
</apiDesc></apiConstructorDetail></apiConstructor><apiValue id="spark.layouts:ViewMenuLayout:horizontalGap:get"><apiName>horizontalGap</apiName><shortdesc>
列間の水平方向の間隔(ピクセル単位)です。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="2.5"/><apiTool description="" name="Flex" version="4.5"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="propertyChange"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Number"/><apiDefaultValue>2
</apiDefaultValue></apiValueDef><apiDesc>
列間の水平方向の間隔(ピクセル単位)です。
</apiDesc></apiValueDetail><related-links><link href="spark.layouts.xml#ViewMenuLayout/verticalGap"><linktext>verticalGap</linktext></link></related-links></apiValue><apiValue id="spark.layouts:ViewMenuLayout:requestedMaxColumnCount:get"><apiName>requestedMaxColumnCount</apiName><shortdesc>
1 行に表示される列の最大数です。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="1.5"/><apiTool description="" name="Flex" version="4"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="int"/><apiDefaultValue>3
</apiDefaultValue></apiValueDef><apiDesc>
1 行に表示される列の最大数です。
</apiDesc></apiValueDetail></apiValue><apiValue id="spark.layouts:ViewMenuLayout:verticalGap:get"><apiName>verticalGap</apiName><shortdesc>
行間の垂直方向の間隔(ピクセル単位)です。</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="AIR" version="2.5"/><apiTool description="" name="Flex" version="4.5"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty isBindable="true" name="propertyChange"/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiType value="Number"/><apiDefaultValue>2
</apiDefaultValue></apiValueDef><apiDesc>
行間の垂直方向の間隔(ピクセル単位)です。
</apiDesc></apiValueDetail><related-links><link href="spark.layouts.xml#ViewMenuLayout/horizontalGap"><linktext>horizontalGap</linktext></link></related-links></apiValue></apiClassifier></apiPackage>