RecordSetDisplay (クラス)
public abstract RecordSetDisplay {inherits Visual, CommandContext}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.CONTROL-BASE.
直接継承しているサブクラス: RecordForm, RecordGrid

RecordSet を表示する UI 要素のスーパークラス。

説明

この要素は、RecordSet からのデータをレンダリンク、操作および編集するための UI を表示します。 records は、現在表示されているレコードセットを表す内部 RecordView です。current-record は、表示されているかフォーカスが置かれているレコードを示すカーソルを表します。 RecordSetDisplay は、current-record プロパティの変更を示すためにそれ自体で CurrentRecordChangedCurrentRecordChangeRequest とイベントを発生させます。データ自体への変更をモニタするには、records ビューで発生するイベントを処理します。 RecordSetDisplayCommandContext であり、以下の Command もサポートする点に注意してください。

コンストラクタ
default:このオブジェクトを作成します。
コンストラクタ public {RecordSetDisplay.default
record-source:#RecordSet = null,
sort:#RecordSort = null,
filter:#RecordFilter = null,
key-spec:any = null
}

プロパティ
current-index:records 内で、現在表示されている、またはフォーカスが置かれているレコードのゼロベースのインデックス。
アクセサ public RecordSetDisplay.current-index:int
セッター public RecordSetDisplay.current-index:int
current-record:records 内で現在表示されているかまたはフォーカスが置かれているレコード。
アクセサ public RecordSetDisplay.current-record:#Record
display-navigation-panel?:ナビゲーション パネルを表示するかどうかを指定します。
ローカル オプション public RecordSetDisplay.display-navigation-panel?:bool =true
filter:records に適用されるフィルタ。
アクセサ public RecordSetDisplay.filter:#RecordFilter
セッター public RecordSetDisplay.filter:#RecordFilter
key-proc:レコードのキー値を算出するために使用できるプロシージャ。
フィールド public-get private-set RecordSetDisplay.key-proc:#{proc-type {r:Record}:any}
key-spec:データ ソースで固有のレコードを識別するために使用される一意キーの仕様。
アクセサ public RecordSetDisplay.key-spec:any
セッター public RecordSetDisplay.key-spec:any
record-source:表示されるデータを格納する RecordSet
アクセサ public RecordSetDisplay.record-source:#RecordSet
セッター public RecordSetDisplay.record-source:#RecordSet
records:現在表示されているレコード。
アクセサ public RecordSetDisplay.records:RecordView
sort:records に適用されるソート。
アクセサ public RecordSetDisplay.sort:#RecordSort
セッター public RecordSetDisplay.sort:#RecordSort
プロパティ 継承 Visual: _style-element, clonable-class?, completely-clonable-children?, cursor, data-source, display-context, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, possibly-displayed?, style-class, style-element, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data, visual-parent
プロパティ 継承 CommandContext: commands
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-parent, option-register-proc, options-present-here, registered-option-keys

クラス変数と定数
preserve-indices:レコードの固有キーが単に RecordSetDisplay.records コレクションのレコード インデックスであることを指定する、RecordSetDisplay.key-spec の値。
public constant RecordSetDisplay.preserve-indices:any ={proc {r:Record}:any {return {type-switch r.record-set case rv:RecordView do {rv.get-index r} else -1 } } }

メソッド
create-command:時間をかけてコマンドを作成します。
protected {RecordSetDisplay.create-command name:String}:#Command
note-current-record-changed:current-index への変更および/または current レコードの識別情報の変更を示すために呼び出されます。
protected {RecordSetDisplay.note-current-record-changed
index-change?:bool,
identity-change?:bool
}:void
note-record-set-event:RecordSetEventRecordSetDisplay.records プロパティによって処理されたことをこのレコード グリッドに通知します。
public {RecordSetDisplay.note-record-set-event ev:RecordSetEvent}:void
on-current-record-change-request:CurrentRecordChangeRequest イベントのスタティック イベント ハンドラ
public {RecordSetDisplay.on-current-record-change-request}:void
reload:record-source を再ロードしてコントロールを更新します。
public {RecordSetDisplay.reload}:void
request-current-record-change:RecordSetDisplay.current-index の変更を要求します。
public {RecordSetDisplay.request-current-record-change
new-index:int
}:bool
メソッド 継承 Visual: add, add-from-init-args, animate, change-cursor, clear, clonable-appearance?, clone-appearance, clone-appearance-helper, find-graphical-ancestor, find-test-children, get-focus-manager, get-graphical-root, get-gui-path, get-gui-path-to-child, get-layout-context, get-origin-in-graphical-ancestor, get-origin-in-root, get-test-parent, get-test-property, get-text, get-top-left-in-ancestor, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-attached, note-caret-position, note-detaching, on-drag-enter, on-drag-leave, on-pointer-enter, on-pointer-envelope-event, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, request-draw, request-key-focus, scroll-to-include, test-record, test-run, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates, xy-offset-to
メソッド 継承 CommandContext: add-command, command-enabled?, command-supported?, do-command, get-command, request-update-commands
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 GuiEventTarget: handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-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-in, on-focus-out, on-gesture, on-gesture-begin, on-gesture-end, on-gesture-magnify, on-gesture-pan, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-inspection, on-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-press, 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-changed, 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
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 OptionListInterface: add-option, add-style-option, 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, notify-option-children, option-change-notify, option-changed, option-lookup, option-lookup-here, option-propagate-notify, option-set?, propagate-option-change, register-options, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {RecordSetDisplay.default
record-source:#RecordSet = null,
sort:#RecordSort = null,
filter:#RecordFilter = null,
key-spec:any = null
}

このオブジェクトを作成します。

record-source: 表示される RecordSet
sort: sort の初期値。
filter: filter の初期値。
key-spec: key-spec の初期値。



プロパティ詳細
current-index (アクセサ)
アクセサ public RecordSetDisplay.current-index:int
セッター public RecordSetDisplay.current-index:int

records 内で、現在表示されている、またはフォーカスが置かれているレコードのゼロベースのインデックス。

プログラミング注意事項

アプリケーションでは通常このプロパティを直接設定しません。代わりに、RecordSetDisplay.request-current-record-change を呼び出し、アプリケーションに応答する機会を与えて、場合によっては変更を「却下」できるようにする系統立てた方法で現行レコードを変更するようにしてください。
現在のインデックスを直ちに絶対的に変更しなければならない場合に (元のデータが削除されたためなど) このセッターを呼び出します。これは通常サブクラスのみで必要になるものです。

説明

表示するレコードがない場合、この値は -1 です。その他の場合は 0 と records.size - 1 の間の値になります。
この制約範囲外の値に設定した場合の効果はありません。


current-record (アクセサ)
アクセサ public RecordSetDisplay.current-record:#Record

records 内で現在表示されているかまたはフォーカスが置かれているレコード。

プログラミング注意事項

このプロパティは設定できないことに注意してください。現行レコードを変更するには、代わりに RecordSetDisplay.request-current-record-change を呼び出します。

説明

現行レコードがない場合、このプロパティは null 値になります。

オーバーライド

通常はオーバーライドしません。代わりに RecordSetDisplay.current-index をオーバーライドします。


display-navigation-panel? (ローカル オプション)
public RecordSetDisplay.display-navigation-panel?:bool =true

ナビゲーション パネルを表示するかどうかを指定します。

説明

ナビゲーション パネルには通常、current-record、表示レコード数およびレコードの合計数に関する情報が含まれます。また、current-record を移動するためのコントロールが含まれる場合もあります。


filter (アクセサ)
アクセサ public RecordSetDisplay.filter:#RecordFilter
セッター public RecordSetDisplay.filter:#RecordFilter

records に適用されるフィルタ。

説明

このメソッドの既定の実装では、records コレクション上の同名のプロパティを設定するだけです。

オーバーライド

通常はオーバーライドしません。


key-proc (フィールド)
public-get private-set RecordSetDisplay.key-proc:#{proc-type {r:Record}:any}

レコードのキー値を算出するために使用できるプロシージャ。

説明

キー値は、このクラスの実装によって使用され、個別のレコードを識別し、大量の変更、または基礎データのソートなどの状態を保持します。詳細については、RecordSetDisplay.key-spec を参照してください。
このプロシージャへの入力は、算出するキーのレコードである必要があります。このレコードは、このオブジェクトの RecordSetDisplay.records コレクションである必要があります。
キーが指定されなかった場合、このフィールドは null になります。
このプロパティは RecordSetDisplay.preserve-indices、この表示の records コレクション内のレコードのインデックスを返す定数プロシージャに等しいことに注意してください。この値はその他の key-proc として正しく処理できますが、サブクラスでは、この値を明示的に認識させると、大量の変更をより効果的に処理できることができます。

プログラミング注意事項

このプロパティはキー値を生成しなければならない実装によって使用されます。キー値を指定しなければならないアプリケーションは、代わりに key-spec を設定しなければなりません。


key-spec (アクセサ)
アクセサ public RecordSetDisplay.key-spec:any
セッター public RecordSetDisplay.key-spec:any

データ ソースで固有のレコードを識別するために使用される一意キーの仕様。

説明

record-source で大量の変更が発生した場合 (RecordsBulkChanges または RecordsReordered など)、current-index、または選択したものなど、この表示されたレコードのインデックスに関連する状態は、もはや意味がなくなります。この場合、このオブジェクトは、固有のレコードを識別する方法として、RecordSetDisplay.key-spec を使用してこのような状態の保持を試みます。
key-spec が指定されない場合、またはオブジェクトが key-spec を使用して変更した record-source でレコードを検索できない場合、この状態はクリアされます。current-index の場合は、これは 0 に設定することを意味します。
このプロパティの有効値は次のとおりです。
  • String。一意の non-null 値を含む、元の record-source のフィールドを表します。nullable? でない RecordFieldIndexType.uniqueindex-type を持つフィールドが適切ですが、強制ではありません。
  • {proc {r:Record}:any} 型の proc。これは一意な non-null の値を record-source の各レコードに生成します。
  • RecordSetDisplay.preserve-indices。元のレコードの変更方法に関係なく、既存のレコード インデックスを再使用することを示す定数キーです。
  • null、キーは使用されません。クリアするレコード インデックスに依存するすべての状態。
key-spec を指定しない場合、RecordSetDisplay.current-recordselection などの状態の表示は、大量の変更があったり、record-source に対してソートを適用したりした場合に消失する可能性があります。
このクラスは、指定された key-spec が一意の非 null 値を生成することを厳密には強制しません。不適切なキーを指定すると、エンド ユーザーに予期しない結果が返される可能性があります。

プログラミング注意事項

実装では、このプロパティを直接使用すべきではありません。あらゆるレコードのキー値を効果的に算出するため、RecordSetDisplay.key-proc を使用します。


record-source (アクセサ)
アクセサ public RecordSetDisplay.record-source:#RecordSet
セッター public RecordSetDisplay.record-source:#RecordSet

表示されるデータを格納する RecordSet

説明

このプロパティを null に設定すると、データは表示されません。このプロパティをまだロードされていない RecordSet に設定した場合、RecordSet.load メソッドによるロードが行われます。


records (アクセサ)
アクセサ public RecordSetDisplay.records:RecordView

現在表示されているレコード。

説明

実際に表示されているデータのビューを表します。
表示中のデータを変更するには、この RecordView のプロパティを変更します。


sort (アクセサ)
アクセサ public RecordSetDisplay.sort:#RecordSort
セッター public RecordSetDisplay.sort:#RecordSort

records に適用されるソート。

説明

このメソッドの既定の実装では、records コレクション上の同名のプロパティを設定するだけです。

オーバーライド

通常はオーバーライドしません。



クラス変数と定数の詳細
preserve-indices (クラス定数)
public constant RecordSetDisplay.preserve-indices:any ={proc {r:Record}:any {return {type-switch r.record-set case rv:RecordView do {rv.get-index r} else -1 } } }

レコードの固有キーが単に RecordSetDisplay.records コレクションのレコード インデックスであることを指定する、RecordSetDisplay.key-spec の値。

説明

大量の変更があった後でも、RecordSetDisplay.current-index の既存のインデックスおよび選択したものを保存する場合は、key-spec のこの設定を使用します。詳細については、RecordSetDisplay.key-spec を参照してください。




メソッド詳細
create-command (メソッド)
protected {RecordSetDisplay.create-command name:String}:#Command

時間をかけてコマンドを作成します。

説明

通常は直接呼び出されません。代わりに、CommandContext.get-command を呼び出すことを検討してください。

オーバーライド

要求されたときにこの CommandContext で動的にインスタンス化する必要があるコマンドの場合は、このメソッドをオーバーライドします。スーパークラスから動的に作成されたコマンドも同様に継承したい場合は、必ずこのメソッドのスーパークラスの実装も呼び出してください。

なお、コマンドは、クラスのコンストラクタでメソッド CommandContext.add-command を呼び出して指定することもできます。パフォーマンスの理由と、サブクラスでコマンドをオーバーライドできるようにするために、このメソッドを代わりに使用することを推奨します。


note-current-record-changed (メソッド)
protected {RecordSetDisplay.note-current-record-changed
index-change?:bool,
identity-change?:bool
}:void

current-index への変更および/または current レコードの識別情報の変更を示すために呼び出されます。

説明

このメソッドの既定実装は、非同期処理で CurrentRecordChanged イベントを生成し、キューに投入します。

オーバーライド

この変更に対し同期的に応答するサブクラスは、必ずスーパー実装も呼び出すよう、このメソッドをオーバーライドする必要があります。


note-record-set-event (メソッド)
public {RecordSetDisplay.note-record-set-event ev:RecordSetEvent}:void

RecordSetEventRecordSetDisplay.records プロパティによって処理されたことをこのレコード グリッドに通知します。

オーバーライド

ディスプレイの元のデータに起こった変更に応答するには、このメソッドをオーバーライドします。基本実装では、関連するレコードセットのサイズが変更したときに、current-index プロパティが有効範囲内にとどまるようになっています。したがって、実装では必ずスーパー実装を最初に呼び出してから、追加のアクションを実行してください。


on-current-record-change-request (メソッド)
public {RecordSetDisplay.on-current-record-change-request}:void

CurrentRecordChangeRequest イベントのスタティック イベント ハンドラ

説明

スタティック イベント ハンドラの一般的な情報については、GuiEventTarget.on-pointer-event を参照してください。


reload (メソッド)
public {RecordSetDisplay.reload}:void

record-source を再ロードしてコントロールを更新します。

説明

これにより、コミットされていない変更内容は失われることに注意してください。


request-current-record-change (メソッド)
public {RecordSetDisplay.request-current-record-change
new-index:int
}:bool

RecordSetDisplay.current-index の変更を要求します。

new-index: int。変更後のインデックス。-1self.records.size - 1 の間にない場合、エラーがスローされます。

戻り値

bool。変更に成功したかどうかを示す値。

説明

このメソッドを呼び出すことにより、アプリケーションで変更を「却下」できるようにするといった応答の機会を与えて、筋道にかなう方法でディスプレイの current-index を変更することができます。
変更は、このオブジェクトで CurrentRecordChangeRequest イベントを生成および発生させて行います。実際には RecordSetDisplay のスタティック ハンドラが、他のハンドラが介入してイベントを消費していないという前提条件のもとにインデックスを変更します。