ChartBox (クラス)
public ChartBox {inherits ShapeBox}
パッケージ: CURL.GUI.CHARTS

ChartGraphic として表示するのに使用される特別なコンテナです。

説明

ChartBox は、box の左上が起点となる ShapeBox です。ShapeBox とは異なり、使用される Elastic はグラフが伸縮しても起点が左上からずれないよう慎重に作成されます。ChartBox の全体のサイズはそのコンテンツの幅設定によって決定されます。
これは、Chart がグラフィカル階層に追加される時に使用される既定の Box で、Chart.to-Graphic によって返されるオブジェクトです。
導入: バージョン 6.0

コンストラクタ
clone-appearance-from:新規オブジェクトを生成するためのコンストラクタ。
コンストラクタ protected {ChartBox.clone-appearance-from
other:ChartBox,
fixup:#{proc-type {Visual, Visual}:Visual}
}
default:新しい ChartBox を作成します。
コンストラクタ public {ChartBox.default ...}

プロパティ
clonable-class?:当該クラスがクローン化可能である場合は、true を返します。その他の場合は false を返します。
アクセサ protected ChartBox.clonable-class?:bool
プロパティ 継承 ShapeBox: as-Box, display-context, style-element
プロパティ 継承 SequenceBox: child-array, completely-clonable-children?, contains-valid?, graphical-children, invalid-epoch, layouts-have-valid-sequence-number?, option-register-proc, ordered-children, registered-option-keys, reverse-ordered-children
プロパティ 継承 ShapeRoot: as-ShapeRoot
プロパティ 継承 ShapeContainerBase: as-Shape, shape-children
プロパティ 継承 GetBoundsBox: layout-locally-valid?, layout-valid?
プロパティ 継承 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
プロパティ 継承 Box: clip-child-shadows?
プロパティ 継承 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?, 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
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: options-present-here

メソッド
clone-appearance-helper:クローンを作成し、クローン自体を返します。
protected {ChartBox.clone-appearance-helper
fixup:#{proc-type {Visual, Visual}:Visual}
}:Visual
constrain-height:指定した高さの制約を受けた場合にこの Graphic の幅設定を返します。
public {ChartBox.constrain-height
lc:LayoutContext,
ascent:Distance,
descent:Distance
}:Dimension
constrain-width:指定した高さの制約を受けた場合にこの Graphic の高さ設定を返します。
public {ChartBox.constrain-width
lc:LayoutContext,
lextent:Distance,
rextent:Distance
}:Dimension
get-height-preference:この Graphic の高さ設定を返します。
public {ChartBox.get-height-preference lc:LayoutContext}:Dimension
get-width-preference:この Graphic の幅設定を返します。
public {ChartBox.get-width-preference lc:LayoutContext}:Dimension
メソッド 継承 ShapeBox: add, add-shape-graphic-child, after-reposition, allocate-layout-object, before-reposition, clear, draw, get-current-draw-transformation, get-gui-path-to-child, handle-crossing, invalidate-shape-layout, note-attached, note-detaching, notify-option-children, on-drag-enter, on-pointer-enter, on-pointer-envelope-event, pick-child, register-options, request-draw, request-draw-rect, request-pointer-trace, set-size, shape-container-pick-child
メソッド 継承 SequenceBox: add-at-index, add-at-index-with-layout, attempt-revalidate-layout, compare-children, end-pagination, find, graphical-child-visible-at, internal-remove-child, propagate-request-layout, swap-children, validate-layout-sequence-numbers
メソッド 継承 BasicBox: contains-point?, find-graphic-at, pointer-enter-occurred, pointer-leave-occurred
メソッド 継承 ShapeContainerBase: clone-children, constrain-shape-layout-bounds, draw-shape-child, draw-shape-children, get-all-children-at-point, get-child-at-point, get-leaf-at-point, get-shape-bounds, get-shape-bounds-in-shape-root, get-shape-layout-bounds, get-shape-root, remove, set-shape-index, set-shape-index-after, set-shape-index-before, shape-container-fire-inferior-crossing-event, shape-container-handle-crossing, shape-container-pointer-enter-occurred, shape-container-pointer-leave-occurred
メソッド 継承 GetBoundsBox: get-bounds, get-elastic-bounds-into, get-nonparent-bounds-into, request-layout, validate-layout
メソッド 継承 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-text, 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, 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
メソッド 継承 Box: find-test-children, get-delimited-child-text-selection, get-range-as-selected-text, get-visible-rect-in-root-into, make-gui-mark, search-next-here, search-prev-here
メソッド 継承 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
メソッド 継承 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-inspection, option-changed, paginate, paint-with-decorations, replace-with, search-next, search-prev, set-layout, start-pagination, xy-offset-to
メソッド 継承 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, 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
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
clone-appearance-from (コンストラクタ)
protected {ChartBox.clone-appearance-from
other:ChartBox,
fixup:#{proc-type {Visual, Visual}:Visual}
}

新規オブジェクトを生成するためのコンストラクタ。

other: クローンする ChartBox
fixup:
各クローンを作成するために呼び出されるプロシージャ。クローン化する時に使用され ChartBox.clone-children に渡されます。
このプロシージャは二つの引数と共に呼び出されます。元のオブジェクトと clone-appearance のメカニズムによって生成されたコピーオブジェクトです。このプロシージャによって返された値はクローンとして使用されます。このプロシージャはコピーするオブジェクトに修正を加えて返すことができます。このプロシージャが null を返すことはできません。

説明

クローン化をサポートする ChartBox のサブクラスはこのコンストラクタを呼び出すコンストラクタを持たなければなりません。クローンに追加しなければならない情報があるかどうか分からない場合、このコンストラクタはサブクラスのクローンを作成しません。このクラスのサブクラスはクローンを作成しそれらを追加する必要があります。何か追加の情報が必要でない場合、単に ChartBox.clone-children を呼び出すだけです。そうでない場合は、ChartBox.clone-children をオーバーライドしそれを呼び出さなければなりません。通常、clone-apperance-from コンストラクタから呼び出される ChartBox.clone-children は以下のようになります。
{if {type-of self} == {compile-time-type-of self} then
    {self.clone-children other, fixup}
}


default (コンストラクタ)
public {ChartBox.default ...}

新しい ChartBox を作成します。

...: 残余引数を Shape にして、通常 ChartChartBox、イベント ハンドラ、またはグラフィック オプションの初期化に追加することができます。
導入: バージョン 6.0



プロパティ詳細
clonable-class? (アクセサ)
アクセサ protected ChartBox.clonable-class?:bool

当該クラスがクローン化可能である場合は、true を返します。その他の場合は false を返します。

オーバーライド

既定の実装は false を返します。クローン化機能を提供するクラスは、{type-of self} == {compile-time-type-of self} を返すためには、このゲッターをオーバーライドする必要があります。クローン化可能な Visual が必ずしもクローン化可能であるとは限らないので、単に true を返すだけでは正しくありません。
このメソッドをオーバーライドする場合は、Visual.clone-appearance-helper もオーバーライドする必要があります。





メソッド詳細
clone-appearance-helper (メソッド)
protected {ChartBox.clone-appearance-helper
fixup:#{proc-type {Visual, Visual}:Visual}
}:Visual

クローンを作成し、クローン自体を返します。

オーバーライド

既定の実装はエラーをスローします。クローン化機能を提供するクラスは、
{{compile-time-type-of self}.clone-appearance-from self, fixup}
を返すためには、このゲッターをオーバーライドする必要があります。


constrain-height (メソッド)
public {ChartBox.constrain-height
lc:LayoutContext,
ascent:Distance,
descent:Distance
}:Dimension

指定した高さの制約を受けた場合にこの Graphic の幅設定を返します。

lc: このレイアウト ネゴシエーションに対して有効な LayoutContext
ascent, descent: 高さの制約。この Graphic の起点からの相対的な上昇および下降の距離で表されます。

戻り値

オブジェクトの幅設定を表す Dimension。この Dimension は、後続のレイアウト処理中に OriginElastic に変換されます。

オーバーライド

既定のメソッド Graphic.constrain-height は、単に Graphic.get-width-preference を呼び出します。このメソッドは、オブジェクトが幅設定を計算する際に高さの制約を考慮しなくてもいい場合はオーバーライドする必要がありません。

このメソッドをオーバライドするクラスでは必ず Dimension を返すようにして、これで必要な水平軸に沿ったスペースをそのオブジェクトの起点との関係を含めて表します。実際には、これはこのメソッドが適切な OriginElastic または Dimension を返すことを意味します。Dimension の場合は、「次元から OriginElastics への変換」で説明する変換規則に従って、適切な OriginElastic に変換されます。

重要:このメソッドのオーバーライド実装には、レイアウト ネゴシエーションが確実にグラフィック階層全体に適用されるように、スーパークラス実装の呼び出しを含める必要があります。


constrain-width (メソッド)
public {ChartBox.constrain-width
lc:LayoutContext,
lextent:Distance,
rextent:Distance
}:Dimension

指定した高さの制約を受けた場合にこの Graphic の高さ設定を返します。

lc: このレイアウト ネゴシエーションに対して有効な LayoutContext
lextent, rextent: 幅の制約。起点からの左と右の相対距離で表されます。

戻り値

オブジェクトの高さ設定を表す Dimension。この Dimension は、後続のレイアウト処理中に OriginElastic に変換されます。

オーバーライド

既定のメソッド Graphic.constrain-width は、単に Graphic.get-height-preference を呼び出します。このメソッドは、オブジェクトが高さ設定を計算する際に幅制約を考慮しなくてもいい場合はオーバーライドする必要がありません。

このメソッドをオーバライドするクラスでは必ず Dimension を返すようにして、これで必要な垂直軸に沿ったスペースをそのオブジェクトの起点との関係を含めて表します。実際には、これはこのメソッドが適切な OriginElastic または Dimension を返すことを意味します。Dimension の場合は、「次元から OriginElastics への変換」で説明する変換規則に従って、適切な OriginElastic に変換されます。

重要:このメソッドのオーバーライド実装には、レイアウト ネゴシエーションが確実にグラフィック階層全体に適用されるように、スーパークラス実装の呼び出しを含める必要があります。


get-height-preference (メソッド)
public {ChartBox.get-height-preference lc:LayoutContext}:Dimension

この Graphic の高さ設定を返します。

lc: このレイアウト ネゴシエーションに対して有効な LayoutContext

戻り値

オブジェクトの高さ設定を表す Dimension。この Dimension は、後続のレイアウト処理中に OriginElastic に変換されます。

オーバーライド

このメソッドは、Graphic のサブクラス内で定義する必要があります。

このメソッドをオーバライドするクラスでは必ず Dimension を返すようにして、これで必要な垂直軸に沿ったスペースをそのオブジェクトの起点との関係を含めて表します。実際には、これはこのメソッドが適切な OriginElastic または Dimension を返すことを意味します。Dimension の場合は、「次元から OriginElastics への変換」で説明する変換規則に従って、適切な OriginElastic に変換されます。


get-width-preference (メソッド)
public {ChartBox.get-width-preference lc:LayoutContext}:Dimension

この Graphic の幅設定を返します。

lc: このレイアウト ネゴシエーションに対して有効な LayoutContext

戻り値

このオブジェクトの幅設定を表す Dimension。この Dimension は、後続のレイアウト処理中に OriginElastic に変換されます。

オーバーライド

このメソッドは、Graphic のサブクラスで定義する必要があります。

このメソッドをオーバライドするクラスでは必ず Dimension を返すようにして、これで必要な水平軸に沿ったスペースをそのオブジェクトの起点との関係を含めて表します。実際には、これはこのメソッドが適切な OriginElastic または Dimension を返すことを意味します。Dimension の場合は、「次元から OriginElastics への変換」で説明する変換規則に従って、適切な OriginElastic に変換されます。