(クラス)
共通する多数のイベント処理を 1 か所に統合するボタン UI クラスのスーパークラス。
説明
このクラスでは、ボタンの動作に関して多くの想定が行なわれています。ポインタ プレス、キー プレス、ポインタ グラブなどに関しては、ボタン UI クラスは同じように動作すると想定しています。新しい LookAndFeel によりこのような想定が無効になった場合、このクラスの変更が必要になります。たとえば、イベント ハンドラを ButtonUI 具象サブクラスに移動する必要が生じる可能性があります。
オーバーライド
具象サブクラスは、以下のメソッドをオーバーライドする必要があります。
具象サブクラスは、こうしたメソッドを必要に応じて特に以下のコンストラクタまたはオプション変更ハンドラから呼び出す必要があります。
コンストラクタ public | {BaseButtonUI.default ...} |
フィールド public BaseButtonUI.action-char-key-pressed?:
bool =false
フィールド public BaseButtonUI.action-chars:#{
Set-of char}
フィールド public BaseButtonUI.button-pressed?:
bool =false
非ローカル オプション public BaseButtonUI.enabled?:
bool
focus?: | オブジェクトにキーボード フォーカスがあるかどうかを示す状態変数。 |
フィールド public BaseButtonUI.focus?:
bool =false
grabbed?: | このオブジェクト内でポインタ ボタンを押したままドラッグしたかどうかを示す状態変数。 |
フィールド public BaseButtonUI.grabbed?:
bool =false
フィールド protected BaseButtonUI.has-been-rendered?:
bool =false
フィールド public BaseButtonUI.pointer-pressed?:
bool =false
フィールド public BaseButtonUI.rollover?:
bool =false
プロパティ 継承 ControlUI:
color, control, control-appearance-changeable?, control-color, control-content-background, copy-options, focus-skin, font-family, font-style, font-weight, skin, text-breakable?, text-line-through?, text-preserve-whitespace?, text-underline? プロパティ 継承 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, 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 プロパティ 継承 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
protected | {BaseButtonUI.add-action-char key:char}:void |
protected abstract | {BaseButtonUI.do-press-action}:void |
protected | {BaseButtonUI.is-action-char? key:char}:bool |
protected abstract | {BaseButtonUI.modify-for-focus focus?:bool}:void |
protected | {BaseButtonUI.remove-action-char key:char}:void |
メソッド 継承 BaseFrame:
add-internal, 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, internal-remove-child, note-attached, note-detaching, notify-option-children, paginate, pick-child, propagate-request-layout, register-options メソッド 継承 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-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-gui-event, on-input-method-event, on-key-event, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-scroll, on-raw-key-event, on-raw-key-press, 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 メソッド 継承 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-lookup-here, option-propagate-notify, 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, 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 メソッド 継承 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, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, 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
(コンストラクタ)
public | {BaseButtonUI.default ...} |
(フィールド)
public BaseButtonUI.action-char-key-pressed?:
bool =false
アクション文字 (ニーモニック、スペースバーなど) を表すキーが押されているかどうかを示す状態変数。
(フィールド)
public BaseButtonUI.action-chars:#{
Set-of char}
入力されたときにボタンを "押した" ことにする文字。
(フィールド)
public BaseButtonUI.button-pressed?:
bool =false
(非ローカル オプション)
public BaseButtonUI.enabled?:
bool Visual が有効であるかどうかを指定します。
説明
このオプションが false の場合、オブジェクトやGUI オブジェクトとのユーザー インタラクションは無効になります。
このオプションを
true に設定する代わりに、オプションを
unset する方が一般的です。これにより、一部の親コンテナの値は、有効な値を判別します。
- このオプションが false の場合、オプションに応じて、テキストは disabled-color および disabled-text-sunken? で表示されます。
例
例 |
|
{paragraph I am enabled}
{paragraph enabled? = false, I'm not}
| |
このオプションが false で、
Visual がコントロールの場合、コントロールのユーザー インターフェイスは無効になります。前述したように、ラベル上の任意のテキストは、無効状態で表示されます。
例
例 |
|
{radio-buttons
value = "first",
{RadioButton radio-value = "first"},
{RadioButton
radio-value = "second",
reactive-label = {ReactiveLabel
label-disabled = "(second)"
},
enabled? = false
},
{RadioButton radio-value = "third"}
}
| |
(フィールド)
public BaseButtonUI.focus?:
bool =false
オブジェクトにキーボード フォーカスがあるかどうかを示す状態変数。
非推奨
(フィールド)
public BaseButtonUI.grabbed?:
bool =false
このオブジェクト内でポインタ ボタンを押したままドラッグしたかどうかを示す状態変数。
(フィールド)
protected BaseButtonUI.has-been-rendered?:
bool =false
画面にコントロールを描画する前に不要な描画を削除するために使用されます。
(フィールド)
public BaseButtonUI.pointer-pressed?:
bool =false
ボタンが押された状態のポインタがこのオブジェクトの上にあるかどうかを示す状態変数。
(フィールド)
public BaseButtonUI.rollover?:
bool =false
ポインタがこのオブジェクトの上にあるかどうかを示す状態変数。
(メソッド)
protected | {BaseButtonUI.add-action-char key:char}:void |
入力されたときにこのボタンを "押した" ことにする文字を登録します。
(メソッド)
protected abstract | {BaseButtonUI.do-press-action}:void |
ボタンのアクションを実行します。
オーバーライド
ボタンによって実行されるアクションの度に実行する必要があるものは、サブクラスでこれをオーバーライドする必要があります。
(メソッド)
protected | {BaseButtonUI.is-action-char? key:char}:bool |
この文字が入力されたときに、このボタンを "押したことにする" かどうかを示します。
(メソッド)
protected abstract | {BaseButtonUI.modify-for-focus focus?:bool}:void |
ボタンがフォーカスを取得したときあるいは失ったときに視覚的にこれを変更します。
オーバーライド
サブクラスでは、オブジェクトがフォーカスを取得するたびまたは失うたびに適切な操作が実行されるようにこれをオーバーライドします。
(メソッド)
"フォーカス" 状態に変化し、適宜に反応します。
説明
状態変数を設定し、イベントを消費して送信します。
(メソッド)
"標準" 状態に変化し、適宜に反応します。
説明
状態変数を設定し、イベントを消費して送信します。
(メソッド)
(メソッド)
KeyPress イベントを操作します。
注意事項
キーがアクション用の文字の場合、ボタンを "pressed" 状態にします。
(メソッド)
"ロールオーバー" 状態に変化し、適宜に反応します。
説明
状態変数を設定し、イベントを消費して送信します。
(メソッド)
"標準" 状態に変化し、適宜に反応します。
説明
状態変数を設定し、イベントを消費して送信します。
(メソッド)
押されたポインタがオブジェクトの外に移動したときを検出します。
説明
状態変数を設定してポインタがオブジェクトの内側か外側かを計算し、イベントを消費して送信します。
(メソッド)
PointerPress イベントを操作します。
説明
処理されると、PointerPress イベント e は消費されます。
(メソッド)
(メソッド)
キーがスペース バーの場合は、ボタンを標準の "押されてない" 状態に戻すことができます。
説明
ポインタが押されたままの場合、押されていない状態には戻りません。
(メソッド)
protected | {BaseButtonUI.remove-action-char key:char}:void |
入力されたときにこのボタンを "押したことにする" 文字を登録解除します。
(メソッド)
このオブジェクトにレイアウト幅と高さを代入します。
注意事項