Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document provides brief descriptions of the table and tree components available for developing Nexawb Java Application UIs. This document also provides brief descriptions of the table and tree component specific attributes.

table

A collection of data arranged in columns and rows.

NexawebImage Removed

Nexaweb Studio makes this widget available in the Palette view from which you can drag and drop it onto a UI file in the Visual Editor.

Example XAL for using this widget in a freePane:

このドキュメントでは、Nexaweb Java Application UI開発時に利用可能なテーブルやツリーのコンポーネントについて、簡単な説明をしています。またこのドキュメントではテーブルとツリーのコンポーネント属性の概要を提供しています。

table

コラムと行で配列されたデータ集合体です。

Image Added

Nexaweb Studio では Paletteview でこのウィジットが利用可能で、そこからVisual Editorの UI ファイルにドラッグ&ドロップすることができます。

freePane でこのウィジットを使用した XAL の例:

 

Code Block
<table height="200px" width="300px" x="10px" y="50px">
  <column>
   <header text="Column #1"/>
  </column>
  <column>
   <header text="Column #2"/>
  </column>
  <row>
   <cell text="Row 1 Cell 1"/>
   <cell text="Row 1 Cell 2"/>
  </row>
  <row>
   <cell text="Row 2 Cell 1"/>
   <cell text="Row 2 Cell 2"/>
  </row>
  <row>
   <cell text="Row 3 Cell 1"/>
   <cell text="Row 3 Cell 2"/>
  </row>
</table>

tree

NexawebImage Removed

Displays data in a hierarchical format.Image Added

階層的形式でデータを表示します。

Nexaweb Studio makes this widget available in the Palette view from which you can drag and drop it onto a UI file in the Visual Editor.

Example XAL for using this widget in a freePane:

では Paletteview でこのウィジットが利用可能で、そこから Visual Editor の UI ファイルにドラッグ&ドロップすることができます。

freePane でこのウィジットを使用した XAL の例:

 

Code Block
<tree height="100px" width="180px" x="10px" y="20px">
  <column/>
  <row>
   <cell text="Tree Item 1"/>
   <row>
    <cell text="Sub Tree Item 1"/>
   </row>
   <row>
    <cell text="Sub Tree Item 2"/>
   </row>
  </row>
  <row>
   <cell text="Tree Item 2"/>
  </row>
 </tree>

treeTable

 NexawebImage RemovedCombines a tree and table to display hierarchical data in a tabular format.Image Added

ツリーとテーブルを組み合わせテーブル形式で階層的データを表示する

Nexaweb Studio makes this widget available in the Palette view from which you can drag and drop it onto a UI file in the Visual Editor.Example XAL for using this widget in a freePane:では Paletteview でこのウィジットが利用可能で、そこから Visual Editor の UI ファイルにドラッグ&ドロップすることができます。

freePane でこのウィジットを使用した XAL の例:

 

Code Block
 <treeTable height="120px" width="280px" x="10px" y="170px">
  <column>
   <header text="Column #1"/>
  </column>
  <column>
   <header text="Column #2"/>
  </column>
  <row>
   <cell text="Tree Item 1"/>
   <cell text="Tree Item 1"/>
   <row>
    <cell text="Sub Tree Item 1"/>
    <cell text="Sub Tree Item 1"/>
   </row>
   <row>
    <cell text="Sub Tree Item 2"/>
    <cell text="Sub Tree Item 2"/>
   </row>
  </row>
  <row>
   <cell text="Tree Item 2"/>
   <cell text="Tree Item 2"/>
  </row>
 </treeTable>

Table and Tree Attributes

The following table lists and provides brief descriptions of table and tree component specific attributes: 

AttributeDescription
altBackgroundColorBy default, the table component provides a different background color for alternating rows in the table. Use this attribute to specify the background color for alternating rows in the table.
altColorSpecifies the font color of text that appears in alternating rows in the table.
collapsedImageSpecifies an image to visually represent a collapsed row.
expandedImageSpecifies an image to visually represent an expanded row.
highlightBackgroundColorSpecifies the background color to appear when a row is selected.
highlightColorSpecifies the font color of text when a row is selected.
horizontalLineColorSpecifies the color of the horizontal border lines that separate rows. By default, the horizontal border lines are opaque.
keyMatchResetSpecifies the time in seconds after which a user stops typing that the pattern matching functionality resets.
leafImageSpecifies the icon to use for a row with no children.
quickEditUse in conjunction with:
The Table selectionMode attribute set to singleCell
The Column editable attribute set to true

Then, set this attribute to true and when a user clicks on an editable cell, the user can immediately begin editing that cell. In addition, when the user presses the up/down/left/right arrows, focus transfers to adjacent cells, which, if in columns with the editable attribute set to true, the user can also immediately begin editing. 

Pressing the enter key commits text and proceeds to the next cell in the column.

When a table with the quickEdit attribute set to true receives focus, the last edited cell will be placed in quick edit mode if possible.

To return a cell from quckEdit mode to editable mode, where a user edits using the arrow keys, click on the cell.  Right-click on the cell to again return to quick edit mode. Or use the F2 key to toggle between edit modes of the cell.

resizableColumnsSpecifies whether a user can resize columns by resizing the column headers.
True=yes; false=no. True by default.
rowHeightSpecifies the row height for all rows in the table.
rowImageVerticalAlignmentSpecifies the vertical alignment of images in a row as top or center. Center by default.
selectionModeSpecifies what can be selected in the table at a given time. For example, only a single row or a single cell, or multiple rows (using Shift or Ctrl keys). singleRow by default.
sortTypeSpecifies the column sorting method as stable or unstable
stable: Use for multi-column sorting; preserves the order of equal elements. Combine with the columns sortPriority attribute.
unstable: Does not make ties between columns; the sort action for each column sorts that entire column and does not provide any special handling for adjacent columns.
swappableColumnsSpecifies whether a user can rearrange the column order by dragging the column headers.
True=yes; False=no. True by default. 
treeLineColorSpecifies the color of the lines connecting nodes in tree rows.
verticalLineColorSpecifies the color of the vertical border lines that separate columns. By default, the vertical border lines are opaque.

Cell

A table cell is one cell in a table row. Cells are optimized for use in tables. Although rows can hold any type of component, using cells is more efficient.

The following table lists and provides brief descriptions of cell specific attributes: 

AttributeDescription
editableSpecifies whether a user can edit this cell. If specified, the value of this attribute overrides the value of the editable attribute set for the column in which the cell resides.
editingIndicates when a cell with the editable attribute set to true is being edited. Set this attribute to true to place an editable cell into edit mode. Only one cell can be in editing mode at any given time.
selectedUse in conjunction with the table\tree\treeTable selctionMode attribute set to singleCell or multiCell.  Then, this attribute specifies whether the cell is selected. True=yes; false=no.
sortValueSpecifies a value to use for sorting the cell rather than the text contained in the cell. Specify a sortValue that matches the type of data specified by the column dataType attribute, as the dataType attribute controls how the table sorts data.
textSpecifies the text content of the cell.
valueSpecifies a logical value for the cell/listItem rather than the displayed text. This value is sent back to the server when a selection is made in a listBox or treeTable that is the selection component of a comboBox that is part of a form. It is also reported as part of the event parameter string in the ClientEvent or server URL.

Column

Defines the properties of a single column in a table.

The following table lists and provides brief descriptions of column specific attributes: 

...

テーブルとツリー属性

次の表では、テーブルとツリーのコンポーネント特有の属性の概要一覧を示しています:

属性説明
altBackgroundColorデフォルト設定で、テーブルコンポーネントはテーブルの行を交互に異なる背景色を提供する。この属性を使い、テーブルの行を交互にする背景色を指定する。
altColorテーブルの行のテキストを交互に表すフォント色を指定する。
collapsedImage非表示の行を視覚的に表示するために画像を指定する。
expandedImage展開行を視覚的に表示するために画像を指定する。
highlightBackgroundColor行が選択された時表示されるよう背景色を指定する。
highlightColor行が選択された時、テキストのフォント色を指定する。
horizontalLineColor行を分ける水平境界線の色を指定する。デフォルトで水平境界線は不透明色になっている。
keyMatchResetユーザーが機能に合致したパターンを停止したあとの時間を秒単位で指定する。
leafImage子なしの行に使用するアイコンを指定する。
quickEdit次と併せて使用する:
singleCell に設定された tableselectionMode 属性
true に設定された column editable 属性
その後、この属性を true に設定し、ユーザーが編集できるセルをクリックしユーザーは直ちにそのセルの編集を始めることができる。それに加え、ユーザーが上/下/左/右矢印を押下し、フォーカスが隣接したセルに移動し、それが編集可能な属性が true に設定しているコラムにある場合、ユーザーは直ちに編集を開始することができる。
エンターキーを押すとテキストが決定され、コラムの次のセルに進む。
true に設定されたquickEdit 属性付きのテーブルがフォーカスを受けた時、最後編集されたセルは、可能であればクイック編集モードに配置される。
セルを quckEdit モードから、ユーザーが矢印キーを使用しながら編集をするeditableモードに戻す際、セルをクリックする。Quick edit modeに戻すためには再び quick edit modeCell を右クリックする。またはF2キーを使用しセルの編集モード間の切り替えをする。
resizableColumnsユーザーがコラムヘッダーをリサイズすることによりユーザーが列をリサイズできるよう指定する
true=はい、 false=no。 デフォルトでは "true"
rowHeightテーブルの全ての行の高さを指定する。
rowImageVerticalAlignment画像の縦のアライメントをトップまたはセンターに指定する。デフォルト:センター
selectionMode一回にテーブルで選択するものを指定する。例えば、一行のみ、または一つのセル、または複数行(Shift または Ctl キーを使用) デフォルトではsingleRow
sortTypestable または unstable としてコラムソート方法を指定する。
stable: 複数のコラムソートに使用する;イコール要素の順番を保持する。 columnssortPriority 属性と組み合わせる。
unstable: コラム間でtieを作らない。各コラムのソートは、コラム全体をソートし、隣接したコラムに関する特別対応を提供しない。
swappableColumnsユーザーはコラムヘッダーをドラッグすることにより、ユーザーによるコラムの再調整の指定することができる。
true=はい、 false=no。 デフォルトは "true"
treeLineColorツリーの行でノードをつなぐ線の色を指定する。
verticalLineColorコラムを分ける縦の境界線の色を指定する。
デフォルトでは縦の境界線はオパーク(不透明)

Cell

テーブルセルは、テーブル行で一つの セルです。セルはテーブル使用用に効率化されています。行はどのような種類のコンポーネントも保有することはできますが、セルを使用した方がより効率的です。

次の表は cell 特有の属性の一覧と概要を示しています:

属性説明
editableユーザーがこのセルを編集できるかどうか指定できる。指定した場合、この属性の値は、セルがあるコラムに設定されたeditable属性の値よりも優先される。
editingtrue に設定されている Editable 属性付きのセルが編集中の場合に表示される。この属性をtrueに設定し、編集可能セルを編集モードにする。一回にひとつの セルのみ編集モードにすることができる。
selectedsingleCellまたはmultiCellに設定されているtable\tree\treeTable selctionMode と共に使用する。その後、この属性により セルの選択を指定する。 true=はい、 false=いいえ
sortValueセルに含まれているテキストのソートではなく、セル自身のソートに使用する値を指定する。dataType属性が、テーブルがデータをどのようにソートするのかを管理するため、column dataType 属性に指定されているデータのタイプに合致する sortValue 指定する
textセルのテキスト内容を指定する
value表示された内容ではなく、cell/list アイテムのロジカル値を指定する。この値はフォームの一部である listBox または treeTable で選択がされたとき、サーバーに戻る。また、ClientEvent またはサーバー URL のイベントパラメーター文字列として報告される。

Column

テーブルのシングルコラムのプロパティを定義します。

次の表ではコラム特有の属性のリストと概要を示しています:

属性説明
dataTypeこのコラムでの セルのデータ型 (number、string, bigDecimal 等)を指定する。テーブルは異なるデータタイプをソートする異なるメソッドを使用する。
editableユーザーがこのコラムのセルを編集できるかどうかを指定するTrue=yes; false=no
editorコラムのカスタムeditor を指定する。これは、UI ドキュメントの defs セクションで宣言されている textField または comboBox を参照にしている。editable コラムのデフォルトエディタはシンプルな textBox。
selected選択または未選択としてコラムの状態を指定。True=selected; false=unselected.
sortSpecifies the order by which to sort the column: ascending or descending.
The value of this attribute in the DOM always reflects the current sort state of the column.
sortableSpecifies whether a column can be sorted by clicking on the column header. Trueコラムのソートの順番を指定: 昇順または降順
DOM のこの属性値には、常にコラムのソート状態が反映
sortableコラムヘッダーをクリックすることでコラムがソート可能にするかどうかを指定するTrue=yes; false=no.
sortPrioritySpecifies the priority to give the column in table sorting. Priority should have a minimum of 1, which is the highest priority. When multiple columns in a table have priorities set, the table sorts such that the column with the highest priority (lowest number) is sorted, while the secondary column is sorted relative to the higher priority column. This means the values in the secondary column are not fully sorted, only sorted where elements in the first column are tied. Use this attribute in conjuction with the Table sortType attribute set to stable as unstable sorts do not preserve ties while reordering.
visualIndexThe visual index of the column, this will be updated as columns are repositioned by the user. The index is 0-based. This is similar to DisplayService.getVisualColumnIndex(). This attribute is intended to be read-only, setting it will have no effect on the UI.
widthSpecifies a fixed width for the column. By default, if you do not specify this attribute, Nexaweb autosizes column to fit the components in it.
The value of this attribute in the DOM always reflects the current width of the column.

 

Row

Defines a horizontal collection of cells and other components in a table

The following table lists and provides brief descriptions of row specific attributes: 

AttributeDescription
collapsedImageSpecifies an image to visually represent a collapsed row.
Setting this attribute overrides the Table collapsedImage attribute.
expandedSpecifies whether the row is expanded or contracted. テーブルソートで優先するかを指定する。優先順位として最少が1、これが一番優先順位が高くなる。テーブルの複数のコラムの優先順位が設定される場合、テーブルは優先順位が高いコラム(一番小さい数字)がソートされるようにテーブルはソートされるが、一方で2番目のコラムはプライオリティが高いコラムに対しソートされる。つまり2番目のコラムの値は全てソートされず、最初のコラムで tie されている要素のみソートされる。unstable ソートは、並び替えしている間 tie を保存しないため、stable に設定されている sortType 属性と併せてこの属性を使用する。
visualIndexコラムのビジュアルインデックス(視覚的指標)。これは、コラムがユーザーにより再配置されるたび更新される。インデックスは0-based。これはDisplayService.getVisualColumnIndex() と同様である。この属性はリードオンリーを意図されており、UI には効果はないよう設定されている。
widthコラムの固定幅を指定する。デフォルトで、この属性を指定しなければ、Nexaweb がそのコンポーネントのサイズ設定を自動的に行う。
DOM のこの属性の値は常にコラムの現在の幅を反映する。

  
Row  

横のcell集合体とテーブルの他のコンポーネントを定義します。

次の表は行特有の属性の一覧と概要を示しています:

属性説明
collapsedImage非表示の行を視覚的に表示する画像
この属性を設定するとテーブルの collapsedImage より優位になる
expanded行を拡大もしくは縮小するよう指定する
True=expanded; false=contracted.
The value of this attribute in the DOM always reflects the current expansion state in the UI.
expandedImageSpecifies an image to visually represent an expanded row.
Setting this attribute overrides the Table expandedImage attribute.
heightSpecifies a fixed height for the row. By default, if you do not specify this attribute, Nexaweb autosizes the row to fit the components in it.
leafImageSpecifies the icon to use for a row with no children.
Setting this attribute overrides the Table leafImage attribute.
selectedSpecifies the status of the row as selected or unselected. True=selected; false=unselected. DOM のこの属性値は常に UI の現在の拡大状況を反映している。
expandedImage拡大した行を視覚的に表示する画像を指定する。
この属性を設定するとテーブルの expandedImage より優位になる
height行の固定された高さを指定する。デフォルトでは、この属性を指定できなければ、Nexaweb はコンポーネントがそれにフィットするよう自動的にサイズ調整をする。
leafImage子なしで行に使用するアイコンを指定する。
この属性を設定するとテーブルの leafImage より優位になる。
selected選択済みまたは未選択として行の状態を指定する。
true=選択、 false=未選択