MenuPane (クラス)
public MenuPane {inherits MultiUIControlFrame, BaseMenuPane}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.CONTROL-LOGICAL.
直接継承しているサブクラス: DropdownMenuPane

プルダウン サブメニューまたはポップアップ メニュー。

注意事項

MenuPane 内に含まれるコントロールは、選択したり、フォーカスを受け取ることが出来ます。MenuPane それ自身は、選択したり、フォーカスを受け取ることが出来ません。その為、トラバーサルに関連したアクティビティに参加することが出来ません。
ActiveTraversor.takes-focus? も参照してください。

説明

通常は、SubMenu のペインとして使用されます。context-popup を使用してポップアップ メニューとして使用することもできます。

詳細および例については、『Curl 開発者ガイド』の「メニュー」セクションを参照してください。

ビジュアル テスト

このクラスは、CurlMenu ビジュアル テスト タイプを実装します。
すべての Visual によってサポートされる既定のビジュアル テスト アクションの他に、このクラスのオブジェクトは次のアクションをサポートします。
アクション 引数 説明
Select path:Stringこのメニューからのパスを使用して、メニュー アクションを選択し、アクティブにします。たとえば、「colors;green」を使用すれば、このメニューの「colors」のサブメニューで「green」の項目を選択できます。
すべての Visual によってサポートされる既定のビジュアル テスト プロパティの他に、このクラスのオブジェクトは次のビジュアル テスト プロパティをサポートします。
プロパティ 説明
items count:int選択対象のこのメニュー アイテムの数。サブメニュー アイテムの数を取得するには、そのサブメニューを開いて、その items count プロパティの値を取得します。

注意事項

このオブジェクトは、"MenuPane", "MenuPane/up-button", "MenuPane/down-button"のスタイル ルールを記述することによってスタイル化することが出来ます。詳細は スキンが適用された他のコントロール をご覧下さい。

コンストラクタ
default:MenuPane オブジェクトを作成します。
コンストラクタ public {MenuPane.default
ui-object:#MenuPaneUI = null,
use-look-and-feel?:bool = true,
vscroll?:bool = true,
...
}

プロパティ
event-delegate:PointerEventKeyPressMenuManager から取得する Graphic です。
アクセサ public MenuPane.event-delegate:Graphic
style-element:スタイリングの目的のための、この Visual の "要素" や "型" です。
アクセサ public MenuPane.style-element:String
use-look-and-feel?:外観に影響を与える非ローカルオプションの既定値が look-and-feel から継承されたか、グラフィックの親から継承されたかを規定します。
アクセサ public MenuPane.use-look-and-feel?:bool
セッター public MenuPane.use-look-and-feel?:bool
vscroll?:
垂直方向でスクロールが許可されているかどうかを規定します。既定は true です。
false の場合、この方向にコンテンツが入るだけの十分のスペースがないと MenuPane のコンテンツは垂直方向につぶされます。
フィールド public constant MenuPane.vscroll?:bool
プロパティ 継承 MultiUIControlFrame: _ui-object, _ui-set-locally?, control-appearance-changeable?, display-context, focus-object, look-and-feel, options-present-here, ui-object
プロパティ 継承 BaseMenuPane: icon-height, icon-width, menu-bar, opened?, sub-menu, view, view-opacity, wrap-selection?
プロパティ 継承 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?
プロパティ 継承 Menu: always-show-selection?, first-item, for-loop-count, last-item, popup-alongside?, popup-context-visual, size, test-type-name
プロパティ 継承 Observable: has-observers?, notify-observers?
プロパティ 継承 BaseFrame: child, clonable-class?, completely-clonable-children?, graphical-children, halign-spec, hstretch?-spec, ordered-children, reverse-ordered-children, valign-spec, vstretch?-spec, width-first?
プロパティ 継承 CommandBinding: bound-command, bound-command-impl
プロパティ 継承 Visual: _style-element, cursor, data-source, dragee, 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-visible?, tooltip, user-data
プロパティ 継承 Control: control-container, dialog, focus-skin, form, has-value?, skin
プロパティ 継承 GetBoundsBox: layout-locally-valid?, layout-valid?
プロパティ 継承 ActiveTraversor: _active-traversal-container, active-traversal-container, mnemonic, tab-index, takes-focus?, valid?, validation-result
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 Box: clip-child-shadows?
プロパティ 継承 OptionListInterface: option-register-proc, registered-option-keys
プロパティ 継承 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?, 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, visual-parent, vorigin, width

メソッド
add:Graphic 、一般的には SubMenuMenuActionMenu に追加します。
public {MenuPane.add g:any, ...}:#Visual
clear:ボックスのグラフィカルな子を削除します。
public {MenuPane.clear}:void
create-default-ui-object:このオブジェクトに適切な UI オブジェクトを作成します。
protected {MenuPane.create-default-ui-object}:ControlUI
note-item-added:新しい Graphic が追加される時に、MenuPane によって呼び出されるメソッドです。
protected {MenuPane.note-item-added index:int}:void
note-item-removed:Graphic が削除される時に、MenuPane によって呼び出されるメソッドです。
protected {MenuPane.note-item-removed index:int}:void
note-items-cleared:MenuPane.clear が呼び出される時に、MenuPane によって呼び出されるメソッドです。
protected {MenuPane.note-items-cleared}:void
pointer-exited-contents?:ポインタが MenuPane 内にあり、その後ポインタがはずれた場合に、true を返します。
protected {MenuPane.pointer-exited-contents?}:bool
react-to-state-change:コントロールの状態が変更された場合に、コントロールの外観を変更します。
public {MenuPane.react-to-state-change}:void
remove:設定されたアイテムを MenuPane リストから削除します。
public {MenuPane.remove g:Graphic, error-if-missing?:bool = true}:void
メソッド 継承 MultiUIControlFrame: generate-ui-object, handle-look-and-feel-change, handle-observer-message, on-focus-in, option-changed, option-lookup-here, option-propagate-notify, react-to-visual-change, request-key-focus, set-layout
メソッド 継承 BaseMenuPane: add-at-index, close, hide, popup, show, show-adjacent
メソッド 継承 ControlFrame: become-active
メソッド 継承 Menu: get, get-access-items, get-test-property, item-after, item-before, on-pointer-event, record-traversals, test-run, to-Iterator, walk-items, walk-items-proc
メソッド 継承 Observable: add-observer, notify-observers, remove-observer
メソッド 継承 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
メソッド 継承 Visual: add-from-init-args, 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, refresh-style-options, release-key-focus, scroll-to-include, test-record, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates
メソッド 継承 BasicBox: contains-point?, find-graphic-at, handle-crossing, on-pointer-envelope-event, pointer-enter-occurred, pointer-leave-occurred
メソッド 継承 Control: on-pointer-press
メソッド 継承 StandardActiveTraversor: become-active-from-traversal, fire-event-at-container, handle-mnemonic, on-key-press
メソッド 継承 Observer: observe, stop-observing
メソッド 継承 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-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-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
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 GetBoundsBox: get-bounds, get-elastic-bounds-into, get-nonparent-bounds-into, request-layout, validate-layout
メソッド 継承 ActiveTraversor: mark-invalid, mark-valid
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 Box: 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
メソッド 継承 BasicEventTarget: enqueue-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, 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
メソッド 継承 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, paint-with-decorations, replace-with, request-draw, request-draw-rect, request-pointer-trace, search-next, search-prev, start-pagination, xy-offset-to
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {MenuPane.default
ui-object:#MenuPaneUI = null,
use-look-and-feel?:bool = true,
vscroll?:bool = true,
...
}

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

ui-object: UI 代理です。
use-look-and-feel?: MenuPane.use-look-and-feel? の最初の値を提供します。
vscroll?:
垂直方向のスクロールを有効または無効にします。既定は true です。
false の場合、この方向にコンテンツが入るだけの十分のスペースがないと MenuPane のコンテンツは垂直方向につぶされます。
...: 非キーワード引数は MenuAction または SubMenu であることが必要です。



プロパティ詳細
event-delegate (アクセサ)
アクセサ public MenuPane.event-delegate:Graphic

PointerEventKeyPressMenuManager から取得する Graphic です。

戻り値

このコントロールに関連する UI オブジェクトがあればそのオブジェクトを返します。そうでなければ、self を返します。


style-element (アクセサ)
アクセサ public MenuPane.style-element:String

スタイリングの目的のための、この Visual の "要素" や "型" です。

説明

この実装によって Visual._style-elementの値が返されますが、通常は定数を返すためにオーバーライドされます。

オーバーライド

Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入: バージョン 6.0


use-look-and-feel? (アクセサ)
アクセサ public MenuPane.use-look-and-feel?:bool
セッター public MenuPane.use-look-and-feel?:bool

外観に影響を与える非ローカルオプションの既定値が look-and-feel から継承されたか、グラフィックの親から継承されたかを規定します。

説明

このプロパティが true の場合、非ローカル オプションは the-default-look-and-feel とグラフィックの親から継承されます。そうでなければ、グラフィックの親から直接継承されます。
このプロパティの影響を受けるオプションは、control-colorcontrol-content-backgroundGraphic.backgroundcolorfont-sizefont-weightfont-familyfont-style です。


vscroll? (フィールド)
public constant MenuPane.vscroll?:bool

垂直方向でスクロールが許可されているかどうかを規定します。既定は true です。
false の場合、この方向にコンテンツが入るだけの十分のスペースがないと MenuPane のコンテンツは垂直方向につぶされます。

導入: バージョン 6.0





メソッド詳細
add (メソッド)
public {MenuPane.add g:any, ...}:#Visual

Graphic 、一般的には SubMenuMenuActionMenu に追加します。

g: 追加するアイテム。g がまだ Graphic でない場合、gGraphic に強制変換され、その結果が追加されます。

注意事項

g が既に MenuButton に追加されている場合、最初に削除されその後再び追加されます。
3 つのキーワード引数が許可されています。

戻り値

追加された現在の 実際のGraphic です。追加されたアイテムが既に Graphic であった場合は、それが返されます。


clear (メソッド)
public {MenuPane.clear}:void

ボックスのグラフィカルな子を削除します。



create-default-ui-object (メソッド)
protected {MenuPane.create-default-ui-object}:ControlUI

このオブジェクトに適切な UI オブジェクトを作成します。

説明

このメソッドは、現在の LookAndFeel がこのコントロールの UI オブジェクトを指定しない場合にのみ使用されます。


note-item-added (メソッド)
protected {MenuPane.note-item-added index:int}:void

新しい Graphic が追加される時に、MenuPane によって呼び出されるメソッドです。

index: Graphic が追加されたインデックスです。

注意事項

これは、このオブジェクトに関連する MenuPaneUI が存在する場合に、MenuPaneUI.note-item-added を呼び出します。


note-item-removed (メソッド)
protected {MenuPane.note-item-removed index:int}:void

Graphic が削除される時に、MenuPane によって呼び出されるメソッドです。

index: Graphic が削除されたインデックスです。

注意事項

これは、このオブジェクトに関連する MenuPaneUI が存在する場合に、MenuPaneUI.note-item-removed を呼び出します。


note-items-cleared (メソッド)
protected {MenuPane.note-items-cleared}:void

MenuPane.clear が呼び出される時に、MenuPane によって呼び出されるメソッドです。

注意事項

これは、このオブジェクトに関連する MenuPaneUI が存在する場合に、MenuPaneUI.note-items-cleared を呼び出します。


pointer-exited-contents? (メソッド)
protected {MenuPane.pointer-exited-contents?}:bool

ポインタが MenuPane 内にあり、その後ポインタがはずれた場合に、true を返します。

x, y: MenuPane に関するポインタの座標です。

注意事項

MenuPane が、それに関連する UI オブジェクトを持っていない場合、true を返します。そうでない場合は、MenuPaneUI.pointer-exited-contents? によって返される値を返します。


react-to-state-change (メソッド)
public {MenuPane.react-to-state-change}:void

コントロールの状態が変更された場合に、コントロールの外観を変更します。

説明

このコントロールが non-null の UI オブジェクトをすでに持っている場合、このメソッドは ControlUI.react-to-state-change への呼び出しを生成します。

オーバーライド

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


remove (メソッド)
public {MenuPane.remove g:Graphic, error-if-missing?:bool = true}:void

設定されたアイテムを MenuPane リストから削除します。

g: 削除する Graphic
error-if-missing?: 存在しない要素を削除しようとした場合、このメソッドが KeyNotFoundException をスローするかどうかを示します。 既定値は、trueです。

注意事項

このメソッドは、g を削除した後に、Menu.note-item-removed を呼び出します。
導入: バージョン 6.0