(クラス)
Control を含み、フォームレベルのアクションを処理するコンテナ。
説明
Dialog は
Control に使用される通常のコンテナです。タブ、ニーモニック、開く、閉じるをモーダル ウィンドウまたは非モーダル ウィンドウとして処理します。
グラフィカルで見ると、これは
Frame であるため、
HBox や
Table などのレイアウト オブジェクトは
Dialog の直接のグラフィカルな子になる必要があります。
注意事項
このオブジェクトは、"Dialog"のスタイル ルールを記述することによってスタイル化されます。
コンストラクタ public | {Dialog.default use-look-and-feel?:bool = true,bound-command:#Command = null,... } |
フィールド protected Dialog._controls:{
Array-of Control} ={{Array-of Control}}
フィールド public-get private-set Dialog.open?:
bool =false
アクセサ public Dialog.options-present-here:{
Iterator-of OptionItem}
フィールド public Dialog.return-state:#
String =null
アクセサ public Dialog.style-element:
String
アクセサ public Dialog.use-look-and-feel?:
bool セッター public Dialog.use-look-and-feel?:
bool プロパティ 継承 Visual:
_style-element, cursor, data-source, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data プロパティ 継承 Graphic:
avoid-page-break?, background, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, discrete-select-in-range?, display-context, enabled?, graphic-selectable, height, horigin, is-paginating?, layout, margin, opaque-to-events?, option-parent, outside-margin, pagination-state, parent, possibly-displayed?, selection-context, shadow-color, shadow-spec, visible?, visual-parent, vorigin, width
public constant Dialog.cancel:
String ="cancel"
public constant Dialog.done:
String ="done"
public constant Dialog.no:
String ="no"
public constant Dialog.ok:
String ="ok"
public constant Dialog.yes:
String ="yes"
protected | {Dialog.handle-look-and-feel-change}:void |
protected | {Dialog.handle-observer-message}:void |
public | {Dialog.option-lookup-here}:(item:#OptionItem, local-key?:bool) |
public | {Dialog.option-propagate-notify}:void |
reset: | この Dialog 内のすべてのコントロールと Dialog 自体に Reset イベントを送ります。 |
public | {Dialog.reset}:void |
show: | 独自のウィンドウにダイアログを表示します。 |
public | {Dialog.show title:String = {host-localize "Pop-up Window"},modal?:bool = true,center?:bool = true,owner:#View = {View.get-default-owner},style:DialogStyle = DialogStyle.standard,large-icon:#Pixmap = null,small-icon:#Pixmap = null }:void |
public | {Dialog.show-at-xy}:void |
メソッド 継承 StandardActiveTraversalContainer:
add-internal, become-active, become-active-from-traversal, dispatch-mnemonic, get-sorted-traversors, internal-remove-child, on-key-press, react-to-child-change, register-active-traversor, traverse, traverse-from-visual, unregister-active-traversor メソッド 継承 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-change-request, 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-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-key-event, 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 メソッド 継承 BaseFrame:
after-reposition, allocate-layout-object, attempt-revalidate-layout, before-reposition, compute-child-bounds, compute-parent-elastic, constrain-height, constrain-width, draw, end-pagination, get-height-preference, get-text, get-width-preference, install-child-bounds, note-attached, note-detaching, notify-option-children, paginate, pick-child, propagate-request-layout, register-options, set-size メソッド 継承 Visual:
add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, get-focus-manager, get-layout-context, get-test-parent, get-test-property, 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, refresh-style-options, release-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 メソッド 継承 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, option-change-notify, option-lookup, option-set?, propagate-option-change, 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 メソッド 継承 Box:
clear, compare-children, find-test-children, get-delimited-child-text-selection, get-gui-path-to-child, get-range-as-selected-text, get-visible-rect-in-root-into, graphical-child-visible-at, make-gui-mark, search-next-here, search-prev-here メソッド 継承 Graphic:
create-pagination-state, detach, draw-range-as-selected, draw-shadow, find-ancestor, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-gui-path, 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, option-changed, paint-with-decorations, replace-with, request-draw, request-draw-rect, request-pointer-trace, search-next, search-prev, set-layout, start-pagination, xy-offset-to
(コンストラクタ)
public | {Dialog.default use-look-and-feel?:bool = true,bound-command:#Command = null,... } |
バインドする新しい Dialog オブジェクトを作成します。
use-look-and-feel?:
look-and-feel オブジェクトまたは標準のオプション親のどちらがダイアログの外観の基準になるかを決定します。
(フィールド)
protected Dialog._controls:{
Array-of Control} ={{Array-of Control}}
(アクセサ)
この Dialog に含まれる Control の反復子。
説明
ループや次のようなコードに使用できる反復子を返します。
{for c:Control in d.controls do
set c.enabled? = false
}
(非ローカル オプション)
(フィールド)
public-get private-set Dialog.open?:
bool =false
この Dialog は開いていますか?
説明
これはダイアログが表示される場合は true に、ダイアログが何らかの方法で閉じられている場合は false に設定されます。
(アクセサ)
アクセサ public Dialog.options-present-here:{
Iterator-of OptionItem}
このオブジェクトに存在する全てのオプションのイテレータを返します。オプションは、ローカルで設定されていても、スタイル シートで設定されていても、LookAndFeel で設定されていても、適切であれば全て含まれます。
オーバーライド
option-lookup-here メソッドをオーバーライドする場合は、このメソッドもオーバーライドしなければなりません。通常、option-lookup-here はバインディングオプションに追加されたオプションを(テーブルセルの行列のバインドのように)検索し、このメソッドのオーバーライドは、バインディングオプションを Iterator で返します。
導入:
バージョン 6.0
(フィールド)
public Dialog.return-state:#
String =null
Dialog が閉じられた後の、その状態。
説明
ダイアログが暗黙的に閉じられる場合 (たとえば、クローズ ボックスを使用するか、モーダル ダイアログの場合にエスケープ キーが押されたなど)、
Dialog.return-state は
null になります。
(アクセサ)
アクセサ public Dialog.style-element:
String スタイリングの目的のための、この Visual の "要素" や "型" です。
説明
オーバーライド
Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入:
バージョン 6.0
(アクセサ)
アクセサ public Dialog.use-look-and-feel?:
bool セッター public Dialog.use-look-and-feel?:
bool look-and-feel オブジェクトまたは標準のオプション親のどちらがダイアログの外観の基準になるかを決定します。
説明
このプロパティが true の場合、ローカルおよび非ローカルの両オプションは、ローカル検索の後に、ダイアログの look-and-feel オブジェクト内で検索されます。
非ローカル オプションの場合において、この検索がダイアログのオプション親で通常行われる検索よりも前に行われる点に注意してください。これは、look-and-feel で設定された非ローカル オプションが、このプロパティが true ならば通常はダイアログのグラフィカルな親から継承するオプション設定を隠蔽してしまうことを意味します。
look-and-feel が
StandardLookAndFeel である一般的な場合に影響を受けるオプションのリストについては、
StandardLookAndFeel の説明を参照してください。
このプロパティを使って、Dialog の内容とコントロールの書式設定を、有効な look-and-feel の書式か、ダイアログのグラフィカルな親のどちらに一致させるか簡単に切り替えることができます。
この既定値は
true です。またこの設定内容は、コントロールの
ControlUI のソースとしての
look-and-feel の使用には影響を
与えません。
例
例 |
|
{Frame background={FillPattern.get-wheat},
{Dialog
|| Don't use user preferences as default values.
use-look-and-feel?=false,
{spaced-vbox
halign="center",
{center Click the button below for a friendly message.},
{CommandButton label = "Click Here",
{on Action do
{popup-message "You've clicked a button!",
title = "Friendly Message"}
}
}
}
}
}
{Frame
background={FillPattern.get-wheat},
{Dialog
|| The default value is true anyway
use-look-and-feel?=true,
{spaced-vbox
halign="center",
{center Click the button below for a friendly message.},
{CommandButton label = "Click Here",
{on Action do
{popup-message "You've clicked a button!",
title = "Friendly Message"}
}
}
}
}
}
| |
(クラス定数)
public constant Dialog.cancel:
String ="cancel"
(クラス定数)
public constant Dialog.done:
String ="done"
(クラス定数)
public constant Dialog.no:
String ="no"
(クラス定数)
public constant Dialog.ok:
String ="ok"
(クラス定数)
public constant Dialog.yes:
String ="yes"
(メソッド)
(メソッド)
含まれている Control を名前で検索します。
name: Dialog で検索するコントロール名。
説明
ダイアログに指定された名前のコントロールが含まれている場合、このメソッドはそのコントロールを返します。その名前を持つコントロールが複数ある場合、任意に選択されます。コントロールが見つからない場合、このメソッドは null を返します。
(メソッド)
protected | {Dialog.handle-look-and-feel-change}:void |
look-and-feel が変更されたときに必要な調整を行います。
説明
このメソッドは、look-and-feel が変更されると常に呼び出されます。呼び出される理由は、look-and-feel オプションが変更されたため、または現在の look-and-feel が修正されたためです。この実装では、元の、および新しい
LookAndFeel で有効なオプションが検証され、必要に応じて変更が拡大されます。
Dialog.use-look-and-feel? が false の場合、何も行う必要がありません。
(メソッド)
protected | {Dialog.handle-observer-message}:void |
監視対象のオブジェクトがメッセージを送信するときにこのメソッドを呼び出します。Observer はこのメソッドを実装して、変更が発生したときに処理を実行する必要があります。
sender: 変更があった Observable オブジェクトです。
message: これは、Observer からの変更に関する詳細情報が含まれています。詳細情報がない場合は NULL になります。
(メソッド)
public | {Dialog.option-lookup-here}:(item:#OptionItem, local-key?:bool) |
オプション検索ステップを実行します。
local?:
bool で、このオブジェクトがオプション検索の開始場所である場合は true、オプション検索がこのオブジェクトの子孫から開始した場合は false です。
戻り値
返される
OptionItem には、該当する
key のバインドが含まれます (このオブジェクトで存在する場合)。返される
bool は、
key がローカル オプション キーの場合は true です。この場合、このオブジェクト以降のオプション検索は行なわれません。
プログラミング注意事項
主に内部使用を目的としています。
オーバーライド
クラスが
OptionKey とバインディング オプションのマッピングに非標準のアルゴリズムを実装する場合は、オーバーライドされます。
(メソッド)
public | {Dialog.option-propagate-notify}:void |
バインディング オプションに、このオブジェクトがオプションの親から継承した変更が存在する場合に呼び出されます。
item: 追加または削除されたバインディング オプション。
removed?: item が削除された場合は true、それ以外の場合は false。
プログラミング注意事項
これは、オブジェクトのオプション親から継承したオプションが変更されたことをオブジェクトに通知する場合に、
OptionListInterface のサブクラスが呼び出すメソッドです。このメソッドは、オブジェクトおよび関連オブジェクトへの通知が適切であるかどうかを判定してから (つまり、オプションが非ローカル オプションであり、このバインディング オプションをシャドウするようなバインディング オプションがオブジェクトに存在しないことを確認し)、
OptionListInterface.propagate-option-change を呼び出して、このオブジェクトおよび該当する場合はその子へのオプション変更通知メソッドを呼び出します。
オーバーライド
通常はオーバーライドされません。
(メソッド)
(メソッド)
public | {Dialog.reset}:void |
この Dialog 内のすべてのコントロールと Dialog 自体に Reset イベントを送ります。
(メソッド)
public | {Dialog.show title:String = {host-localize "Pop-up Window"},modal?:bool = true,center?:bool = true,owner:#View = {View.get-default-owner},style:DialogStyle = DialogStyle.standard,large-icon:#Pixmap = null,small-icon:#Pixmap = null }:void |
独自のウィンドウにダイアログを表示します。
説明
title:
Dialog ウィンドウのタイトル。既定値は「ポップアップ ウィンドウ」です。
modal?:
Dialog がモーダルか非モーダルか。既定値は true です。
modal? を
false に設定した場合、
owner を
null に設定し、
Dialog がオーナーを持たないように指定できます。
owner:
Dialog が正面にある
View。
オーナーが指定されていない場合、
GuiManager は、可能である場合、既定のオーナーを選択します。
ダイアログがオーナーを持つことができない場合は null を使用します。
center?:
Dialog をオーナーの前で中央揃えするかどうか。
style:
Dialog ウィンドウのサイズ変更が可能かどうか。
DialogStyle のいずれかになります。既定では、
DialogStyle.standard に設定されます。
large-icon: 大きなアイコン (32x32 ピクセル) が必要な場合に使用されるイメージ。これが null の場合、ダイアログのアイコンは設定されません。
small-icon:
もし、非
nullである場合、
View の表題に表示される可能性のあるアイコンとなります。 もし
null の場合、
View の表題からアイコン(存在する場合)を取り除くことになります。
small-icon は、large-icon が非 null の場合のみに使用されます。
注意事項
特権の無いポップアップ ダイアログに関しては、large-icon および small-icon は効力がありません。
small-icon を使用しないウィンドウ システムもあります。
View の表題にアイコンを表示しないものもあります。これは基本的にウィンドウ システムによって違います。
もし owner が null で modal? が true の場合、ダイアログの View は最高位の View となります。
(メソッド)
public | {Dialog.show-at-xy}:void |
ウィンドウ内の設定された位置にダイアログを表示します。
説明
title:
Dialog ウィンドウのタイトル。既定値は「ポップアップ ウィンドウ」です。
modal?:
Dialog がモーダルか非モーダルか。既定値は true です。
modal? を
false に設定した場合、
owner を
null に設定し、
Dialog がオーナーを持たないように指定できます。
owner:
Dialog が正面にある
View。
オーナーが指定されていない場合、
GuiManager は、可能である場合、既定のオーナーを選択します。
ダイアログがオーナーを持つことができない場合は null を使用します。
style:
Dialog ウィンドウのサイズ変更が可能かどうか。
DialogStyle のいずれかになります。既定では、
DialogStyle.standard に設定されます。
large-icon: 大きなアイコン (32x32 ピクセル) が必要な場合に使用されるイメージ。これが null の場合、ダイアログのアイコンは設定されません。
small-icon:
もし、非
nullである場合、
View の表題に表示される可能性のあるアイコンとなります。 もし
null の場合、
View の表題からアイコン(存在する場合)を取り除くことになります。
small-icon は、large-icon が非 null の場合のみに使用されます。
x, y: スクリーンを基準とした、ダイアログのウィンドウにおける左上隅の水平および垂直オフセットの初期値です。
注意事項
特権の無いポップアップ ダイアログに関しては、large-icon および small-icon は効力がありません。
small-icon を使用しないウィンドウ システムもあります。
View の表題にアイコンを表示しないものもあります。これは基本的にウィンドウ システムによって違います。
もし owner が null で modal? が true の場合、ダイアログの View は最高位の View となります。
導入:
バージョン 6.0
(メソッド)
Control をこの ControlContainer から登録解除します。
説明
Control は、コンテナから削除されるときに、各々のコントロールコンテナ オプション ハンドラでこれを呼び出す必要があります。
c: 登録解除のコントロール。
オーバーライド
登録されたコントロールを追跡するように、これをオーバーライドします。