注意: この手順では、このトピックの最後に記述されているインライン・データがUIXファイルに挿入されているものとして説明しています。demoTableDataというインライン・データでは、行と列のデータが提供されます。
表、列および行に書式を追加するには、次のようにします。
bandingInterval
: 各バンド・グループの行数または列数を入力します。
tableBanding
: 表でのバンドの使用方法を選択します。次の3つの値を指定できます。
noBanding
: デフォルトです。表では、バンドは使用されません。
columnBanding
: 列に交互にバンドが付けられます。各バンド・グループの列数はbandingIntervalにより決定されます。
rowBanding
: 行に交互にバンドが付けられます。各バンド・グループの行数はbandingIntervalにより決定されます。
bandingShade
: 次のいずれかを選択します。
dark
: 列は暗い網掛け表示になります。
light
: 列は明るい網掛け表示になります。
cellNoWrapFormat
: セルのコンテンツを折り返して複数行とした場合に列がレンダリングされるかどうかを、trueまたはfalseを選択して指定します。columnDataFormat
: サポートされている次の値から、列のセルに対応するデータ書式を選択します。
textFormat
: 列のセルのデータは左揃えになります。テキスト・データを表示する場合に使用します。
numberFormat
: 列のセルのデータは右揃えになります。数字を表示する場合に使用します。
iconButtonFormat
: 列のセルのデータは中央揃えになります。アイコンとボタンを表示する場合に使用します。
displayGrid
: グリッド線が列のコンテンツの前に表示されるかどうかを、trueまたはfalseを選択して指定します。デフォルトでは、左から右に記述するロケールの場合、グリッド線は各列の左に表示されます。
width
: 列の幅をピクセル単位またはパーセントで入力します。
注意: データ・バインディングの使用は、「コンポーネント属性のデータ・バインディング」を参照してください。
...
<provider>
<data name="demoTableData">
<inline>
<!-- data for 4 rows -->
<demoRowData firstColumnText="First row"
secondColumnText="First Button"
thirdColumnText="First col"
fourthColumnText="111"
isSelected="false"
isDisabled="true" />
<demoRowData firstColumnText="Second row"
secondColumnText="Second Button"
thirdColumnText="Second col"
fourthColumnText="222"
isSelected="true" />
<demoRowData firstColumnText="Third row"
secondColumnText="Third Button"
thirdColumnText="Third col"
fourthColumnText="333"
isSelected="false" />
<demoRowData firstColumnText="4th row"
secondColumnText="4th Button"
thirdColumnText="4th row col"
fourthColumnText="444"
isSelected="false" />
<!-- data for the row headers -->
<demoRowHeaderData headerText="1"/>
<demoRowHeaderData headerText="2"/>
<demoRowHeaderData headerText="3"/>
<demoRowHeaderData headerText="4"/>
<!-- data for the 4 column headers -->
<demoColHeaderData textKey="H1"/>
<demoColHeaderData textKey="H2"/>
<demoColHeaderData textKey="H3"/>
<demoColHeaderData textKey="H4"/>
<!-- formatting information for the rows -->
<demoRowFormats/>
<demoRowFormats displayGrid="false"/>
<demoRowFormats/>
<demoRowFormats/>
</inline>
</data>
</provider>
...
<contents>
...
<table alternateText="No Items Found."
blockSize="25"
tableData="${uix.data.demoTableData.demoRowData}"
rowFormats="${demoTableData.demoRowFormats}
columnHeaderData="${uix.data.demoTableData.demoColHeaderData}"
rowHeaderData="${uix.data.demoTableData.demoRowHeaderData}">
<tableFormat bandingInterval="1" tableBanding="rowBanding"/>
<contents>
<!-- table's indexed children are the columns -->
<column>
<!-- first column stamp -->
<contents>
<styledText text="${uix.current.firstColumnText}"/>
</contents>
</column>
<column>
<!-- second column stamp -->
<contents>
<styledText text="${uix.current.secondColumnText}"/>
</contents>
<!-- second column header -->
</column>
<column>
<!-- third column stamp -->
<contents>
<styledText text="${uix.current.thirdColumnText}"/>
</contents>
</column>
<column>
<!-- column formatting -->
<columnFormat columnDataFormat="numberFormat"
width="45%"/>
<!-- fourth column stamp -->
<contents>
<styledText text="${uix.current.fourthColumnText}"/>
</contents>
</column>
</contents>
</table>
</contents>
...
columnHeaderの挿入
columnGroupの使用
表の作成
tableコンポーネントの使用
Copyright © 1997, 2004, Oracle. All rights reserved.