(クラス)
ChartAxis の目盛りおよび軸ラベルを格納して配置するヘルパー クラス。
説明
このクラスは、すべてのラベルの
Shape コンテナとしても使用されます。このプロパティの利用例については、以下を参照してください。
注意事項
このオブジェクトは、"ChartLabelGroup"のスタイル ルールを記述することでスタイル化することが出来ます。
例
この例では、ChartLabelGroup でのオプション設定を使用して、ラベルの外観をカスタマイズします。
例:
独自の ChartLabelGroup を提供してのラベル テキストの外観のカスタマイズ |
|
{import * from CURL.GUI.CHARTS}
{import * from CHARTS-DOC,
location = "../docstring-support/gui/charts-doc.scurl"
}
{LayeredChart
width = 15cm,
height = 6cm,
left-axis =
{new {NumericDataSeriesAxis-of double},
{ChartDataSeries sample-records, "Age"},
{ChartDataSeries sample-records, "Points"},
label-group =
{ChartLabelGroup
color = "purple",
font-family = "serif"
}
},
{BarLayer
sample-records,
"Age",
"Points",
x-axis-data = {ChartDataSeries sample-records, "Name"}
}
}
| |
default: | 新しい ChartLabelGroup を作成します。 |
コンストラクタ public | {ChartLabelGroup.default stagger-level:int = 0, ...} |
非ローカル オプション public ChartLabelGroup.axis-label-group-spacing:
any
非ローカル オプション public ChartLabelGroup.axis-label-spacing:
any
非ローカル オプション public ChartLabelGroup.font-family:
String
非ローカル オプション public ChartLabelGroup.font-size:
any
font-style: | オブジェクト内のテキストを斜体や斜投影法などのフォントにするかどうかを指定します。 |
非ローカル オプション public ChartLabelGroup.font-style:
FontStyle
非ローカル オプション public ChartLabelGroup.font-weight:
FontWeight
stagger-level: | 自動交互表示が無効な場合、この ChartLabelGroup の目盛りラベルの補正に使用される交互表示のレベル。 |
アクセサ public final ChartLabelGroup.stagger-level:
int セッター public ChartLabelGroup.stagger-level:
int
アクセサ public ChartLabelGroup.style-element:
String
非ローカル オプション public ChartLabelGroup.text-line-through?:
bool
非ローカル オプション public ChartLabelGroup.text-underline?:
bool
非ローカル オプション public ChartLabelGroup.tick-label-auto-stagger?:
bool
非ローカル オプション public ChartLabelGroup.tick-label-rotation:
Angle プロパティ 継承 Shape:
as-Shape, border-color, color, draw-operation, graphical-parent, option-parent, possibly-displayed?, selection-context, shape-parent, shape-selectable, stroke-thickness, transformation, visible? プロパティ 継承 Visual:
_style-element, completely-clonable-children?, cursor, data-source, dragee, 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, visual-parent
public | {ChartLabelGroup.position-axis-label}:void |
public | {ChartLabelGroup.position-tick-label}:void |
メソッド 継承 Shape:
apply-rotation, apply-scale, apply-transformation, apply-translation, apply-translation-in-parent, constrain-own-layout-bounds, constrain-shape-layout-bounds, contains-point?, detach, find-graphical-ancestor, fire-crossing-event, fire-in-child, get-display-context, get-down-orientation-in-shape-parent, get-graphical-root, get-gui-path, get-gui-path-to-child, get-local-device-pixel-size, get-origin-in-graphical-ancestor, get-origin-in-root, get-origin-in-shape-parent, get-origin-in-shape-root, get-own-layout-bounds, get-right-orientation-in-shape-parent, get-shape-bounds, get-shape-bounds-in-shape-root, get-shape-layout-bounds, get-top-left-in-ancestor, get-transformation-to-shape-root, keyword-init-arg, option-change-notify, overdraw-for-selection, quantize-line-thickness, request-draw, request-draw-self, reset-transformation, set-rotation, set-scale, set-transformation, set-translation-in-parent, to-Graphic, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-point-from-shape-root, transform-point-to-shape-root, transform-to-display-coordinates, transform-to-graphical-root-coordinates, transform-vector-from-shape-root, transform-vector-to-shape-root, transformation-changed, transformation-changing メソッド 継承 ShapeContainerBase:
add, clear, clone-children, draw-shape-child, draw-shape-children, get-all-children-at-point, get-child-at-point, get-leaf-at-point, get-shape-root, note-attached, note-detaching, notify-option-children, on-drag-enter, on-pointer-enter, on-pointer-envelope-event, register-options, remove, set-shape-index, set-shape-index-after, set-shape-index-before, shape-container-fire-inferior-crossing-event, shape-container-handle-crossing, shape-container-pick-child, shape-container-pointer-enter-occurred, shape-container-pointer-leave-occurred メソッド 継承 Visual:
add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, find-test-children, 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, xy-offset-to メソッド 継承 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-inspection, 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 メソッド 継承 OptionListInterface:
add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, option-changed, 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
(コンストラクタ)
public | {ChartLabelGroup.default stagger-level:int = 0, ...} |
新しい ChartLabelGroup を作成します。
...:
Shape が受け取る引数のいずれか。これらは主に、オプションの初期化を表すキーワード引数です。
例
(非ローカル オプション)
public ChartLabelGroup.axis-label-group-spacing:
any
(非ローカル オプション)
public ChartLabelGroup.axis-label-spacing:
any
(非ローカル オプション)
このオブジェクトに関連付けられている 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 オプションでの変更をモニタリングするコードは、この可能性を考慮に入れ、この状況における望ましくない動作の実行を回避しなくてはなりません。
(非ローカル オプション)
public ChartLabelGroup.font-family:
String テキストのフォント書体を設定します。
説明
テキストをレンダリングするフォントの検索に使用するフォント ファミリー名 (または名前のリスト) を指定します。
フォントの指定方法の詳細については、
Font を参照してください。
例 |
|
{VBox
{text font-family = "serif", serif},
{text font-family = "sans-serif", sans-serif},
{text font-family = "monospace", monospace},
{text
font-family = "Arial, Nimbus Sans L, sans-serif",
prefer a particular sans-serif
},
{text
font-family =
"Times New Roman, Nimbus Roman No9 L, serif",
prefer a particular serif
}
}
| |
(非ローカル オプション)
public ChartLabelGroup.font-size:
any オブジェクト内のテキストの既定サイズを指定します。
説明
値は正の値でなければなりません。負の値や、0 はオプションをに設定することはできますが、実行する際にランタイムエラーが発生します。
例
font-size オプションを使用したテキスト サイズの指定方法の例をいくつか示します。"Medium" という語を持つテキスト オブジェクトが、それを含むテキスト オブジェクトから、どのようにフォント サイズを取得するかに注意してください。
例 |
|
{text font-size=12pt,
{text font-size=8pt, Little}
{text font-size=1cm, Pretty big}
{text Medium}
{text font-size=1in, Huge!}
}
{text And this is the default}
| |
参照:
(非ローカル オプション)
オブジェクト内のテキストを斜体や斜投影法などのフォントにするかどうかを指定します。
説明
例
例 |
|
{paragraph font-style="italic", Everything in this paragraph
should be in an italic font,
{text font-style="normal", except for this text fragment.}
}
| |
参照:
(非ローカル オプション)
オブジェクト内のテキストを、太字として強調表示するかどうかを指定します。
説明
例
例 |
|
{paragraph Everything in this paragraph
should be normally weighted,
{text font-weight="bold", except for this text fragment.}
}
| |
参照:
(アクセサ)
アクセサ public final ChartLabelGroup.stagger-level:
int セッター public ChartLabelGroup.stagger-level:
int 自動交互表示が無効な場合、この ChartLabelGroup の目盛りラベルの補正に使用される交互表示のレベル。
説明
(アクセサ)
アクセサ public ChartLabelGroup.style-element:
String スタイリングの目的のための、この Visual の "要素" や "型" です。
説明
オーバーライド
Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入:
バージョン 6.0
(非ローカル オプション)
public ChartLabelGroup.text-line-through?:
bool オブジェクト内のテキストに、取り消し線を適用するかどうかを指定します。
説明
true または
false に設定します。
line-through も参照してください。このオプション用の定義済み文字書式です。
例
例 |
|
{paragraph
Modified Shopping List: onions, carrots, french bread,
{text text-line-through?=true, pot roast},
London Broil, Camembert, eggs, {text
text-line-through?=true, orange juice}, butter, jam.}
| |
参照:
(非ローカル オプション)
public ChartLabelGroup.text-underline?:
bool このオブジェクト内のテキストに、下線を引かれるかどうかを指定します。
説明
true または false に設定します。
例
例 |
|
{paragraph
This is the result of
{text text-underline?=true, setting text-underline? to true}
for a text fragment.
}
{paragraph
{underline But notice what I am doing here{em-dash}I
am using the underline character format and
{text text-underline?=false, setting text-underline? to false.}}
}
| |
参照:
(非ローカル オプション)
public ChartLabelGroup.tick-label-auto-stagger?:
bool この ChartLabelGroup で目盛りラベルを自動的に交互表示して調整するかどうかを指定します。
説明
(非ローカル オプション)
public ChartLabelGroup.tick-label-rotation:
Angle ChartLabelGroup 内の目盛りラベルに適用される回転。
説明
(メソッド)
この ChartLabelGroup のラベルを生成して配置します。
説明
(メソッド)
public | {ChartLabelGroup.position-axis-label}:void |
軸ラベルをこの ChartLabelGroup 内に位置付けます。
axis-label: 軸ラベルを表す
Shape。
tick-label-bounds:
ChartLabelGroup オブジェクトの座標系で、すべての生成された目盛りラベルの境界を記述する
GRect。これは、
axis-label を補正して、目盛りラベルの重なりが起きないようにするために使用されます。
説明
このメソッドでは、
Shape の位置と回転を設定する必要があります。標準実装では、
ChartAxis.position を検証することによって、必要な回転が計算されます。次に
widest-tick-label および
tallest-tick-label に基づいて位置が計算されます。
(メソッド)
public | {ChartLabelGroup.position-tick-label}:void |
目盛りラベルをこの ChartLabelGroup 内に位置付けます。
stagger-distance: ラベルの交互表示のオフセットの距離を表す数量。このオフセットの方向は軸に対し垂直です。
説明
(メソッド)
この ChartLabelGroup 内でレイアウト操作を実行します。
説明
このメソッドは、ChartLabelGroup を ChartAxis の現在の境界の端に位置付けます。これにより、正しい方向で位置付けられたラベルが目盛りまたはグラフに重ならないようになります。