ControlFrame (クラス)
public ControlFrame {inherits BaseFrame, StandardControl, CommandBinding}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.CONTROL-BASE.
直接継承しているサブクラス: MultiUIControlFrame, ValueControlFrame-of

外面的には BaseFrame である Control のスーパークラス。

説明

これは基本コントロールのすべての共通な機能を値を使わずに実装するインスタンス化可能なクラスです。

このクラスは BaseFrame から継承されたものです。すなわち、このクラスにグラフィック子オブジェクトを追加する場合は、クラスをサブクラス化し、クラス内の BaseFrame.add-internal を使用する必要があります。

注意事項

このオブジェクトは"ControlFrame"のスタイル ルールを記述することによってスタイル化されます。

コンストラクタ
default:バインドする新しい ControlFrame オブジェクトを作成します。
コンストラクタ public {ControlFrame.default bound-command:#Command = null, ...}

プロパティ
color:コントロールでは、このオプションは、テキストの色および小さいシンボル (ComboBox 内のボタンの小さい三角形など) に影響を与えます。
非ローカル オプション public ControlFrame.color:FillPattern
control-appearance-changeable?:look-and-feel オブジェクトまたは標準のオプション親のどちらがコントロールの外観の基準になるかを決定します。
非ローカル オプション public ControlFrame.control-appearance-changeable?:bool
control-color:このオプションで、コントロールのボタン部分の主な色を設定します。
非ローカル オプション public ControlFrame.control-color:FillPattern
control-content-background:このオプションは、コントロール内容が背景を持つ場合にその色を制御します。
非ローカル オプション public ControlFrame.control-content-background:Background
enabled?:Visual が有効であるかどうかを指定します。
非ローカル オプション public ControlFrame.enabled?:bool
font-family:このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。
非ローカル オプション public ControlFrame.font-family:String
font-size:このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。
非ローカル オプション public ControlFrame.font-size:any
font-style:このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。
非ローカル オプション public ControlFrame.font-style:FontStyle
font-weight:このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。
非ローカル オプション public ControlFrame.font-weight:FontWeight
style-element:スタイリングの目的のための、この Visual の "要素" や "型" です。
アクセサ public ControlFrame.style-element:String
text-breakable?:このオプションは、コントロール内のテキストを複数行に改行できるかどうかを設定します。
非ローカル オプション public ControlFrame.text-breakable?:bool
text-line-through?:このオプションは、コントロール内のテキストが描かれる方法に影響を及ぼします。
非ローカル オプション public ControlFrame.text-line-through?:bool
text-preserve-whitespace?:このオプションは、コントロール内のテキストが空白文字と改行文字をそのまま保持するか、折りたたむかを設定します。
非ローカル オプション public ControlFrame.text-preserve-whitespace?:bool
text-underline?:このオプションは、コントロール内のテキストが描かれる方法に影響を及ぼします。
非ローカル オプション public ControlFrame.text-underline?:bool
visible?:描画や PointerEvent ディスパッチの目的でこのオブジェクトを透明にして不可視にするかどうかを示す bool
ローカル オプション public ControlFrame.visible?:bool
プロパティ 継承 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
プロパティ 継承 Control: control-container, dialog, focus-skin, form, has-value?, skin
プロパティ 継承 StandardActiveTraversor: focus-object
プロパティ 継承 GetBoundsBox: layout-locally-valid?, layout-valid?
プロパティ 継承 ActiveTraversor: _active-traversal-container, active-traversal-container, mnemonic, tab-index, takes-focus?, valid?, validation-result
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 Box: clip-child-shadows?
プロパティ 継承 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-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, 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
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

メソッド
become-active:アクティブ化に対して応答します。
public {ControlFrame.become-active forward?:bool = true}:bool
clear:ボックスのグラフィカルな子を削除します。
public {ControlFrame.clear}:void
メソッド 継承 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
メソッド 継承 CommandBinding: handle-observer-message
メソッド 継承 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-focus-in, 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-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-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
メソッド 継承 GetBoundsBox: get-bounds, get-elastic-bounds-into, get-nonparent-bounds-into, request-layout, validate-layout
メソッド 継承 ActiveTraversor: mark-invalid, mark-valid, request-key-focus
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 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
メソッド 継承 Visual: add, 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
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 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
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 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
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {ControlFrame.default bound-command:#Command = null, ...}

バインドする新しい ControlFrame オブジェクトを作成します。

bound-command: バインドするbound-command,CommandCommandBinding を参照してください。
...: 残余引数は BaseFrame に渡されます。



プロパティ詳細
color (非ローカル オプション)
public ControlFrame.color:FillPattern

コントロールでは、このオプションは、テキストの色および小さいシンボル (ComboBox 内のボタンの小さい三角形など) に影響を与えます。


例: 色の指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true, color="red",
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {Scrollbar width=.8in, direction=Orientation.horizontal},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


control-appearance-changeable? (非ローカル オプション)
public ControlFrame.control-appearance-changeable?:bool

look-and-feel オブジェクトまたは標準のオプション親のどちらがコントロールの外観の基準になるかを決定します。

説明

このプロパティが false の場合、ローカルおよび非ローカルの両オプションは、ローカル検索のにコントロールの look-and-feel オブジェクト内で検索されます。
非ローカル オプションの場合において、この検索がコントロールのオプション親で通常行われる検索よりもに行われる点に注意してください。これは、look-and-feel で設定された非ローカル オプションが、このプロパティが true ならば通常はコントロールのオプション親から継承するオプション設定を隠蔽してしまうことを意味します。
look-and-feelStandardLookAndFeel である一般的な場合に影響を受けるオプションのリストについては、StandardLookAndFeel の説明を参照してください。

注意事項

このプロパティ自体は、このオブジェクトで、またはこのオブジェクトを含む別の Graphic で設定可能な非ローカル オプションですが、その値は look-and-feel から得られるものではありません。


control-color (非ローカル オプション)
public ControlFrame.control-color:FillPattern

このオプションで、コントロールのボタン部分の主な色を設定します。

説明

これは効果がありません。ただし、ノンローカルオプション ControlFrame.control-appearance-changeable? が true で、標準のルック アンド フィールが使用されている場合は別です。バージョン7.0の既定であるスキンが適用可能なルック アンド フィールでは、コントロールの色は、スキンによって決定されます。
7.0 以上のアプレットでは、標準のルック アンド フィールは明示的に指定する必要があります。install-standard-look-and-feel を呼び出すことによって、アプレット全体に StandardLookAndFeel を適用することが出来ます。また、以下のサンプルに示されるように、 install-style-sheet-on-Graphic プロシージャを使うことも出来ます。標準のルック アンド フィールは、6.0 以前のアプレットでは既定です。ただし、Macintosh プラットフォームは除きます。


{def samples = 
    {HBox valign="bottom", spacing = 4pt,
        control-appearance-changeable? = true, 
        control-color = "cornflowerblue",
        {CommandButton label = "Sample Button"},
        {CheckButton label = "Sample"},
        {Scrollbar width = .8in, direction = "horizontal"},
        {ComboBox width = 1.2in, prompt = "Choose One", 
            "First", "Second", "Third"
        },
        {TextField width = 1.0in, value = "Sample text"}
    }
}
{install-style-sheet-on-Graphic samples, null,
    look-and-feel = the-standard-look-and-feel
}


control-content-background (非ローカル オプション)
public ControlFrame.control-content-background:Background

このオプションは、コントロール内容が背景を持つ場合にその色を制御します。


例: control-content-background の指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true,
    control-content-background="yellow",
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {Scrollbar width=.8in, direction=Orientation.horizontal},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


enabled? (非ローカル オプション)
public ControlFrame.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 がコントロールの場合、コントロールのユーザー インターフェイスは無効になります。前述したように、ラベル上の任意のテキストは、無効状態で表示されます。
    さらに、コントロールに ReactiveLabel があれば、ラベルは既定ラベルの代わりに ReactiveLabel.label-disabled のプロパティを表示します。


    {radio-buttons 
        value = "first",
        {RadioButton radio-value = "first"},
        {RadioButton
            radio-value = "second",
            reactive-label = {ReactiveLabel
                                 label-disabled = "(second)"
                             },
            enabled? = false
        },
        {RadioButton radio-value = "third"}
    }
    


font-family (非ローカル オプション)
public ControlFrame.font-family:String

このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: フォント ファミリーの指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true, font-family="serif",
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


font-size (非ローカル オプション)
public ControlFrame.font-size:any

このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: フォント サイズの指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true, font-size=.5em,
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


font-style (非ローカル オプション)
public ControlFrame.font-style:FontStyle

このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: フォント スタイルの指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true, font-style="italic",
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


font-weight (非ローカル オプション)
public ControlFrame.font-weight:FontWeight

このオプションは、コントロール内のテキストで使用されるフォントに影響を及ぼします。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: フォントの太さの指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true, font-weight="bold",
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


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

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

説明

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

オーバーライド

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


text-breakable? (非ローカル オプション)
public ControlFrame.text-breakable?:bool

このオプションは、コントロール内のテキストを複数行に改行できるかどうかを設定します。

注意事項

テキストを含むオプションには、このオプションをサポートしないものがあります。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: テキストを分割可能とするかどうかの指定
{HBox valign="bottom", spacing=4pt,
    font-size=10pt,
    {CommandButton width=50pt, text-breakable? = false,
        label="Sample Button"
    },
    {CheckButton width=50pt, text-breakable? = false,
        label="Sample CheckButton"
    },
    {ComboBox width=50pt, text-breakable? = false,
        prompt="Choose One", "First", "Second"
    },
    {TextField width=50pt, text-breakable? = false,
        value="Sample text"
    }
}

{HBox valign="bottom", spacing=4pt,
    font-size=10pt,
    {CommandButton width=50pt, text-breakable? = true,
        label="Sample Button"
    },
    {CheckButton width=50pt, text-breakable? = true,
        label="Sample CheckButton"
    },
    {ComboBox width=50pt, text-breakable? = true,
        prompt="Choose One", "First", "Second"
    },
    {TextField width=50pt, text-breakable? = true,
        value="Sample text"
    }
}


text-line-through? (非ローカル オプション)
public ControlFrame.text-line-through?:bool

このオプションは、コントロール内のテキストが描かれる方法に影響を及ぼします。

注意事項

テキストを含むオプションには、このオプションをサポートしないものがあります。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: 取り消し線の指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true, text-line-through? = true,
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


text-preserve-whitespace? (非ローカル オプション)
public ControlFrame.text-preserve-whitespace?:bool

このオプションは、コントロール内のテキストが空白文字と改行文字をそのまま保持するか、折りたたむかを設定します。

注意事項

テキストを含むオプションには、このオプションをサポートしないものがあります。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: 空白を保持するかどうかの指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true,
    text-preserve-whitespace? = true,
    font-size=10pt,
    {CommandButton width=50pt, label="Sample Button"},
    {CheckButton width=50pt, label="Sample CheckButton"},
    {ComboBox width=50pt, prompt="Choose One", "First", "Second"},
    {TextField width=50pt, value="Sample text"}
}

{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true,
    text-preserve-whitespace? = false,
    font-size=10pt,
    {CommandButton width=50pt, label="Sample Button"},
    {CheckButton width=50pt, label="Sample CheckButton"},
    {ComboBox width=50pt, prompt="Choose One", "First", "Second"},
    {TextField width=50pt, value="Sample text"}
}


text-underline? (非ローカル オプション)
public ControlFrame.text-underline?:bool

このオプションは、コントロール内のテキストが描かれる方法に影響を及ぼします。

注意事項

テキストを含むオプションには、このオプションをサポートしないものがあります。

説明

テキスト関連オプションの詳細は、text を参照してください。


例: 下線の指定
{HBox valign="bottom", spacing=4pt,
    control-appearance-changeable?=true, text-underline? = true,
    {CommandButton label="Sample Button"},
    {CheckButton label="Sample"},
    {ComboBox width=1.2in, prompt="Choose One", "First", "Second"},
    {TextField width=1.0in, value="Sample text"}
}


visible? (ローカル オプション)
public ControlFrame.visible?:bool

描画や PointerEvent ディスパッチの目的でこのオブジェクトを透明にして不可視にするかどうかを示す bool

説明

visible? オプションが true (既定値) の場合、オブジェクトは表示されて正常に動作します。visible? オプションが false の場合、オブジェクトは同じ量のスペースを確保しますが、ピクセルを描画せずポインタ イベントに対して透過になります。
表示されていないオブジェクトも、キーボードフォーカスを取得できるので、visible? = false が設定された場合は、enabled? = false も設定することを推奨します。





メソッド詳細
become-active (メソッド)
public {ControlFrame.become-active forward?:bool = true}:bool

アクティブ化に対して応答します。

説明

この ActiveTraversor がアクティブになったときに、ActiveTraversalContainer によって呼び出されます。また ActiveTraversor のアクティブ化リクエストとしてユーザーが呼び出す場合もあります。
forward?: トラバースが前方に移動する場合 (Tab キー) は true、後方に移動する場合 (Shift + Tab キー) は false です。一般にユーザー コードでは既定値 true を使用します。

戻り値

このオブジェクトがアクティブになる予定であれば true、それ以外の場合は false です。


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

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