(クラス)
データのソート、フィルタ、編集可能なグリッド。
説明
RecordGrid は、
RecordGridColumn、
columns コレクションの指定に従い、
record-source 内のデータを表示します。record-source のフィールドの表示と編集機能は、個々の列で制御されます。データの表示方法を変更するために、これらの列を直接操作することができます。
RecordGrid ではその
record-source に基づいて自動的に列を作成することも、これらの列を直接指定することもできます。
ビジュアル テスト
このクラスは、CurlDataTable ビジュアル テスト タイプを実装します。
行と列は、名前 (ただし RecordGrid には名前付きの行がないためサポートされません)、またはインデックスにより参照されます。セルは、行と列のペアで参照されます。
すべての
Visual によってサポートされる既定のビジュアル テスト アクションの他に、このクラスのオブジェクトは次のアクションをサポートします。
| アクション | 引数 | 説明 |
| Action | <none> | テーブルについて標準アクションを実行します。 |
| ActivateCell | row:String, col:String | セル row、col をアクティブにします。特殊なケースとして、row または col のいずれかが -1 の場合、すべてのセルが非アクティブになります。 |
| ActivateRow | row:String | 行 row をアクティブにします。 |
| DeleteSelectedRows | <none> | 現在選択されている行を削除します。 |
| ColumnMove | move-col:String, before-col:String | 列 move-col を列 before-col の前に移動します。 |
| ColumnResize | col:String, delta:int | 列 col のサイズを delta ピクセル分変更します。 |
| ColumnsResize | col1:String, col2:String, delta:int | col1 から col2 までの列のサイズを delta ピクセル分変更します。 |
| ColumnSort | col:String, ascending?:bool | 列をソートします。 |
| DeselectAll | <none> | テーブル内のすべての選択を解除します。 |
| DeselectColumn | col:String | 列 col の選択を解除します。 |
| DeselectColumns | col1:String, col2:String | col1 から col2 までの列の選択を解除します。 |
| DeselectRow | row:String | 行 row の選択を解除します。 |
| DeselectRows | row1:String, row2:String | row1 から row2 までの行の選択を解除します。 |
| ExtendCell | row:String, col:String | セル row、col を選択済みセルのセットに追加します。 |
| ExtendCellsRange | start-row:String, start-col:String, end-row:String, end-col:String | start-row、start-col から end-row、end-col までのセルを選択済みセルのセットに追加します。 |
| ExtendColumn | col:String | 列 col を選択済み列のセットに追加します。 |
| ExtendColumnsRange | col1:String, col2:String | 選択済み列のセットを、col1 から col2 までの列が含まれるように拡張します。 |
| ExtendRow | row:String | 行 row を選択済み行のセットに追加します。 |
| ExtendRowsRange | row1:String, row2:String | 選択済み行のセットを、row1 から row2 までの行が含まれるように拡張します。 |
| GetCellData | row:String, col:String | 指定したセル内のデータを返します。 |
| ModifyCellsRange | start-row:String, start-col:String, end-row:String, end-col:String | 最後に選択された領域を start-row、start-col から end-row、end-col までのセルに変更します。その他の選択には影響しません。 |
| SelectAll | <none> | テーブル内のすべてを選択します。 |
| SelectCell | row:String, col:String | セル row、col を選択します。 |
| SelectCellsRange | start-row:String, start-col:String, end-row:String, end-col:String | start-row、start-col から end-row、end-col までのセルを選択します。 |
| SelectColumn | col:String | 列 col を選択します。 |
| SelectColumnsRange | col1:String, col2:String | col1 から col2 までの列を選択します。 |
| SelectRow | row:String | 行 row を選択します。 |
| SelectRowsRange | row1:String, row2:String | row1 から row2 までの行を選択します。 |
| SetCellData | row:String, col:String, data:String | 指定したセルの内容を設定します。 |
すべての
Visual によってサポートされる既定のビジュアル テスト プロパティの他に、このクラスのオブジェクトは次のビジュアル テスト プロパティをサポートします。
| プロパティ | 説明 |
| rows:String | テーブル内の行の数です。 |
| columns:String | テーブル内の列の数です。 |
| コンストラクタ public | {RecordGrid.default} |
非ローカル オプション public RecordGrid.alternate-row-background:
Background
ローカル オプション public RecordGrid.automatic-columns?:
bool =true
ローカル オプション public RecordGrid.background:
Background
アクセサ public RecordGrid.base-columns:{
Array-of BaseRecordGridColumn}
セッター public RecordGrid.base-columns:{
Array-of BaseRecordGridColumn}
ローカル オプション public RecordGrid.column-selection-enabled?:
bool =false
アクセサ public RecordGrid.columns:{
Array-of RecordGridColumn}
セッター public RecordGrid.columns:{
Array-of RecordGridColumn}
アクセサ public RecordGrid.container:
Graphic
ローカル オプション public RecordGrid.display-column-headers?:
bool =true
ローカル オプション public RecordGrid.display-filler-column?:
bool =false
ローカル オプション public RecordGrid.display-navigation-panel?:
bool
ローカル オプション public RecordGrid.display-record-selectors?:
bool =true
ローカル オプション public RecordGrid.enclose-header-label?:
bool
ローカル オプション public RecordGrid.filter-menu-proc:#{
proc-type {{Array-of MenuItem}, RecordGridCell}:{
Array-of MenuItem}} =null
アクセサ public RecordGrid.frozen-column-count:
int セッター public RecordGrid.frozen-column-count:
int
アクセサ public RecordGrid.frozen-column-start:
int セッター public RecordGrid.frozen-column-start:
int
アクセサ public RecordGrid.frozen-row-count:
int セッター public RecordGrid.frozen-row-count:
int
アクセサ public RecordGrid.frozen-row-start:
int セッター public RecordGrid.frozen-row-start:
int
非ローカル オプション public RecordGrid.grid-line-color:
FillPattern
| header-options: | この RecordGrid ですべての列見出しに適用される "バンドル" 式のグラフィック オプション設定です。 |
非ローカル オプション public RecordGrid.horizontal-grid-line-width:
any
ローカル オプション public RecordGrid.multiple-selection-enabled?:
bool =true
ローカル オプション public RecordGrid.record-selection-enabled?:
bool =true
ローカル オプション public RecordGrid.region-selection-enabled?:
bool =false
ローカル オプション public RecordGrid.row-background-spec:#{
proc-type {RecordGrid, Record, int}:#
Background} =null
ローカル オプション public RecordGrid.select-current-record?:
bool =false
アクセサ public RecordGrid.style-element:
String
| test-type-name: | このオブジェクトをテストのメソッドとプロパティにマッピングするために、ビジュアル テスト インフラストラクチャが使用するタイプ名。 |
アクセサ public RecordGrid.test-type-name:
String
非ローカル オプション public RecordGrid.vertical-grid-line-width:
any プロパティ 継承 RecordGridOptions:
cell-spec, cells-take-focus?, column-movable?, column-resizable?, edit-on-focus?, editable?, format-spec, halign, header-spec, parse-spec, sort-spec, valign プロパティ 継承 Visual:
_style-element, cursor, data-source, dragee, input-method-enabled?, input-method-keyboard-mode, name, options, options-present-here, style-class, style-manager, style-options, test-description, test-name, test-parent?, test-visible?, tooltip, user-data プロパティ 継承 ControlFrame:
color, control-color, control-content-background, enabled?, font-family, font-size, font-style, font-weight, text-breakable?, text-line-through?, text-preserve-whitespace?, text-underline?, visible? プロパティ 継承 BaseFrame:
child, clonable-class?, completely-clonable-children?, graphical-children, halign-spec, hstretch?-spec, ordered-children, reverse-ordered-children, valign-spec, vstretch?-spec, width-first? プロパティ 継承 Graphic:
avoid-page-break?, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, discrete-select-in-range?, graphic-selectable, height, horigin, is-paginating?, layout, margin, opaque-to-events?, option-parent, outside-margin, pagination-state, parent, selection-context, shadow-color, shadow-spec, vorigin, width
| public | {RecordGrid.become-active forward?:bool = true}:bool |
| public | {RecordGrid.become-active-from-traversal}:bool |
| protected | {RecordGrid.create-default-ui-object}:ControlUI |
| public | {RecordGrid.delete-selection}:void |
| public | {RecordGrid.deselect-record index:int}:void |
| public | {RecordGrid.get-test-property name:String}:any |
| public | {RecordGrid.get-test-tabular-attributes }:(full-size:int, min-visible-row:int, max-visible-row:int) |
| public | {RecordGrid.modify-last-selected-region}:void |
| public | {RecordGrid.note-column-changed}:void |
| protected | {RecordGrid.note-current-record-changed index-change?:bool,identity-change?:bool }:void |
| public | {RecordGrid.note-row-options-changed}:void |
| public | {RecordGrid.option-lookup-here}:(item:#OptionItem, local-key?:bool) |
| public | {RecordGrid.propagate-option-change}:void |
| protected | {RecordGrid.refresh-automatic-columns}:void |
| public | {RecordGrid.select-all}:void |
| public | {RecordGrid.select-column}:void |
| public | {RecordGrid.select-column-range}:void |
| public | {RecordGrid.select-nothing}:void |
| public | {RecordGrid.select-record}:void |
| public | {RecordGrid.select-record-range start-index:int,end-index:int,additive?:bool = false }:void |
| public | {RecordGrid.select-region}:void |
| public | {RecordGrid.set-frozen-region rows:int,columns:int,row-start:int = -1,column-start:int = -1 }:void |
| test-run: | オブジェクトに対してビジュアル テスト アクションを実行します。 |
| public | {RecordGrid.unset-frozen-region}:void |
メソッド 継承 GuiEventTarget:
handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-out, on-grab-release, on-gui-event, on-input-method-event, on-key-event, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class メソッド 継承 Visual:
add, add-from-init-args, add-option, add-style-option, animate, change-cursor, clonable-appearance?, clone-appearance, get-focus-manager, get-layout-context, get-test-parent, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-caret-position, on-drag-leave, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, release-key-focus, remove-option, remove-style-option, scroll-to-include, test-record, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates メソッド 継承 OptionListInterface:
change-option-parent-notify, clone-options, get-option, get-option-by-name, keyword-init-arg, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, option-change-notify, option-lookup, option-set?, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name メソッド 継承 BaseFrame:
add-internal, after-reposition, allocate-layout-object, attempt-revalidate-layout, before-reposition, clone-appearance-helper, compute-child-bounds, compute-parent-elastic, constrain-height, constrain-width, draw, end-pagination, get-height-preference, get-text, get-width-preference, install-child-bounds, internal-remove-child, note-attached, note-detaching, notify-option-children, paginate, pick-child, propagate-request-layout, register-options, set-size メソッド 継承 Graphic:
create-pagination-state, detach, draw-range-as-selected, draw-shadow, find-ancestor, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-origin-in-graphical-ancestor, get-origin-in-root, get-pagination-state, get-top-left-in-ancestor, get-visible-bounds-into, on-drag-enter, on-inspection, on-pointer-enter, paint-with-decorations, replace-with, request-draw, request-draw-rect, request-pointer-trace, search-next, search-prev, start-pagination, xy-offset-to
(コンストラクタ)
| public | {RecordGrid.default} |
このオブジェクトを作成します。
ui-object: 描画とイベントを処理する UI デリゲート。
(非ローカル オプション)
public RecordGrid.alternate-row-background:
Background
(ローカル オプション)
public RecordGrid.automatic-columns?:
bool =true
RecordGrid がその RecordGrid.record-source 内のフィールドに対応する RecordGridColumn を自動的に生成するかどうか指定します。
説明
自動生成列は、
record-source が新規の非 null 値に変更されるたびに、または既存
record-source の
RecordSet.fields コレクションが変更されるたびに「リフレッシュ」されます。この操作の目的は、
columns コレクションを
record-source と同期させると同時に、
columns コレクションにアプリケーションやエンドユーザーが加えた変更を可能な限り保持することです。
リフレッシュは以下の規則に従って発生します。
- columns コレクションに現在表されていない record-source のフィールド名に対して、新しい automatic? 列が作成されます。このような列はコレクションの最後に配置されます。
- automatic? 列が record-source のフィールド名を参照しなくなった場合、これらは削除されます。
- automatic? 列は、同じフィールド名を持つ既存の非 automatic? 列を置き換えません。
自動的に生成された列をアプリケーションで管理するには (したがって置き換えや削除が起こらないようにするには)、列の automatic? プロパティを false に設定する必要があります。
(ローカル オプション)
グラフィカル オブジェクトの背景色または背景パターン。
説明
例
| 例:
背景を文字列に設定 |
 |
{CheckButton
label="Check here if you like my background",
background="lime"
}
| |
| 例:
背景を Background オブジェクトに設定 |
 |
{Fill
width = 2cm,
height = 2cm,
background =
{Background
{url "curl://install/docs/default/images/grass.jpg"}
}
}
| |
注意事項
(アクセサ)
アクセサ public RecordGrid.base-columns:{
Array-of BaseRecordGridColumn}
セッター public RecordGrid.base-columns:{
Array-of BaseRecordGridColumn}
表示される順に並べられた BaseRecordGridColumn。
説明
重要:このコレクションの個々の列エンティティは直接編集することができますが、コレクション自体は変更しないでください。表示する列のセット (または順序) を変更するには、このコレクションのクローンを編集し、編集後のクローンとなるようプロパティをリセットします。
(ローカル オプション)
public RecordGrid.column-selection-enabled?:
bool =false
(アクセサ)
アクセサ public RecordGrid.columns:{
Array-of RecordGridColumn}
セッター public RecordGrid.columns:{
Array-of RecordGridColumn}