AppletGraphic (クラス)
public AppletGraphic {inherits Fill}
パッケージ: CURL.ENGINE.BROWSER

アプレットが投影される Graphic です。

説明

AppletData によって管理されるアプレットは、その AppletData が作成された時に与えられる AppletGraphic 上に視覚的に投射されます。
AppletGraphic は、OverlayBoxCanvas のようなコンテンツが重なることを許す Box の内部に貼り付けられている時に、期待通りに動作しない場合があります。具体的には、AppletGraphic は、他の全てのコンテンツの上に現れます。これは、 AppletGraphic がアプレットを異なるホスト ウィンドウに埋め込む為です。AppletGraphic は、ホスト ウィンドウの違いにより Mac OS X 上においては表示されないことに注意してください。
AppletHistory.ag フィールドは、既定では指定された AppletGraphicAppletHistory によって作成された全ての AppletData に自動的に割り当てるのに使用されます。

ライセンス

このクラスは 'occ' を有効にする Curl/Pro サーバー・ライセンスのライセンスがあるアプレットのみにより利用できます。

コンストラクタ
default:AppletGraphic を作成します。
コンストラクタ public {AppletGraphic.default ...}

プロパティ
display-context:このオブジェクトに関連付けられている DisplayContext
非ローカル オプション public AppletGraphic.display-context:#DisplayContext
プロパティ 継承 Fill: clonable-class?, style-element
プロパティ 継承 Graphic: avoid-page-break?, background, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, clip-child-shadows?, discrete-select-in-range?, 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
プロパティ 継承 Visual: _style-element, completely-clonable-children?, 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
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

メソッド
contains-point?:このクラスのオブジェクトでは、{contains-point? x, y} メソッドは、常に false を返します。これらはイベントについて通知されないからです。
public {AppletGraphic.contains-point? x:Distance, y:Distance}:bool
draw:このオブジェクトの可視表現を描画します。
public {AppletGraphic.draw renderer2d:Renderer2d}:void
set-size:このオブジェクトにレイアウト幅と高さを代入します。
public {AppletGraphic.set-size lc:LayoutContext, bounds:GRect}:void
メソッド 継承 Fill: clone-appearance-helper
メソッド 継承 StretchyGraphic: get-height-preference, get-width-preference
メソッド 継承 Graphic: after-reposition, attempt-revalidate-layout, before-reposition, constrain-height, constrain-width, create-pagination-state, detach, draw-range-as-selected, draw-shadow, end-pagination, find-ancestor, find-graphic-at, 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-range-as-selected-text, get-top-left-in-ancestor, get-visible-bounds-into, graphical-child-visible-at, make-gui-mark, on-drag-enter, on-inspection, on-pointer-enter, option-changed, paginate, paint-with-decorations, pointer-enter-occurred, pointer-leave-occurred, replace-with, request-draw, request-draw-rect, request-layout, request-pointer-trace, search-next, search-next-here, search-prev, search-prev-here, set-layout, start-pagination, xy-offset-to
メソッド 継承 Visual: add, add-from-init-args, animate, change-cursor, clear, clonable-appearance?, clone-appearance, find-test-children, get-focus-manager, get-gui-path-to-child, get-layout-context, get-test-parent, get-test-property, get-text, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-attached, note-caret-position, note-detaching, on-drag-leave, 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-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
メソッド 継承 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-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-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-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-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 {AppletGraphic.default ...}

AppletGraphic を作成します。

...: Fill を参照してください。



プロパティ詳細
display-context (非ローカル オプション)
public AppletGraphic.display-context:#DisplayContext

このオブジェクトに関連付けられている DisplayContext

プログラミング注意事項

このオプションは、Curl グラフィック システム内での通信のために使用されます。これは、ユーザー コードで不用意に設定や設定解除を行わないでください。また、通常は、ユーザー コードで直接読み取るべきではありません。現在の DisplayContext が必要な場合は、Visual.get-display-context を呼び出すことによりフェッチしてください。

画面上のウィンドウまたは印刷されたページで表示可能なすべてのグラフィック階層は、そのルートにおいて、display-context オプションを DisplayContext オブジェクトに設定するオブジェクトを持つ必要があります。このオブジェクトは、グラフィック階層の表示に使用される表示媒体に適しています。つまり、オブジェクトは、display-context オプションの値が null から非 null DisplayContext オブジェクトに変更されるのをモニタリングすることにより、表示不可能なグラフィック階層に連結されていることを認識します。したがって、特定の動作を実行する必要のある Visual のサブクラスは、表示不可能なグラフィック階層に接続された場合、次のようなオプション宣言を含むことにより display-context オプションをモニタリングします。

{nonlocal-option public display-context:#DisplayContext
change handler}


ここで、change handler 内のコードは display-context オプションの現在値 (変数 display-context の値として、変更ハンドラ内にある) を取得し、null および非 null の値の間で行われる変更をモニタリングし、必要とされる動作を実行します。

ただし、このプログラミング熟語を使用するプログラマーは、グラフィカル表示を再配列する際、グラフィック階層からグラフィカル オブジェクトを一時的に分離し、これらを同じ階層に再アタッチすることが、割に一般的であることを理解するべきです。この処理により、一時的に分離されたオブジェクトは、display-context オブジェクトが null になり、再び非 null になるのを観察します。display-context オプションでの変更をモニタリングするコードは、この可能性を考慮に入れ、この状況における望ましくない動作の実行を回避しなくてはなりません。





メソッド詳細
contains-point? (メソッド)
public {AppletGraphic.contains-point? x:Distance, y:Distance}:bool

このクラスのオブジェクトでは、{contains-point? x, y} メソッドは、常に false を返します。これらはイベントについて通知されないからです。



draw (メソッド)
public {AppletGraphic.draw renderer2d:Renderer2d}:void

このオブジェクトの可視表現を描画します。

renderer2d: このオブジェクトを使用してそれ自身を描画する Renderer2d

オーバーライド

既定のメソッド Graphic.draw は何もしません。Graphic のサブクラスは、必要とされる描画の操作を実行するコードでこのメソッドをオーバーライドしなければなりません。
このメソッドをオーバーライドする場合は、再描画が必要となる時はいつでも、描画する Graphic の範囲が有効でない事を確認しなければなりません。たとえば、データの値を更新するために描画をする時は、データの値が変わる時にアプレットは必ず Graphic.request-drawGraphic.request-draw-rectを呼び出さなければなりません。


set-size (メソッド)
public {AppletGraphic.set-size lc:LayoutContext, bounds:GRect}:void

このオブジェクトにレイアウト幅と高さを代入します。

説明

このオブジェクトで set-size を呼び出すと、オブジェクトのレイアウト サイズを代入し、オブジェクトのレイアウト ネゴシエーションを完了します。グラフィック階層のすべてのオブジェクトにレイアウト サイズが代入された後で階層のレイアウト ネゴシエーションが完了します。
lc: このレイアウト ネゴシエーションに対して有効な LayoutContext
bounds: このオブジェクトの境界ボックスの左右および上下の範囲をオブジェクトの起点から相対的に示す GRect

プログラミング注意事項

このメソッドは、オブジェクトのグラフィカルな親によって呼び出されます。

オーバーライド

既定のメソッド Graphic.set-size は何も行ないません。Graphicのサブクラスはこのメソッドをオーバーライドして、ここで提供した情報をインターセプトできます。