ChartBox (class)
public ChartBox {inherits ShapeBox}
Package: CURL.GUI.CHARTS

Special container used to display a Chart as a Graphic.

Description

A ChartBox is a ShapeBox with its origin in the top left corner of the box. Unlike the ShapeBox, the Elastics used are carefully constructed to prevent the origin from moving away from the top left even if the chart is stretched. The overall size of a ChartBox is determined by the size preferences of its contents.

This is the default Box used when a Chart is added to a graphical hierarchy. It is the object returned by Chart.to-Graphic.
Introduced in: version 6.0

Constructors
default:Constructs a new ChartBox.
constructor public {ChartBox.default ...}
Properties
Properties inherited from ShapeBox: as-Box, display-context, style-element
Properties inherited from 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
Properties inherited from ShapeRoot: as-ShapeRoot
Properties inherited from ShapeContainerBase: as-Shape, shape-children
Properties inherited from GetBoundsBox: layout-locally-valid?, layout-valid?
Properties inherited from Visual: _style-element, clonable-class?, cursor, data-source, dragee, font-size, input-method-enabled?, input-method-keyboard-mode, name, options, options-present-here, style-class, style-manager, style-options, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
Properties inherited from Box: clip-child-shadows?
Properties inherited from 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, selection-context, shadow-color, shadow-spec, visible?, vorigin, width
Properties inherited from DataBindingTarget: data-binding-context, data-bindings
Properties inherited from EventTarget: event-handlers
Methods
constrain-height:Return the width preference of this Graphic when subjected to a specified height constraint.
public {ChartBox.constrain-height
    lc:LayoutContext,
    ascent:Distance,
    descent:Distance
}:Dimension
constrain-width:Return the height preference of this Graphic when subjected to a specified width constraint.
public {ChartBox.constrain-width
    lc:LayoutContext,
    lextent:Distance,
    rextent:Distance
}:Dimension
get-height-preference:Return the height preference of this Graphic.
public {ChartBox.get-height-preference lc:LayoutContext}:Dimension
get-width-preference:Return the width preference of this Graphic.
public {ChartBox.get-width-preference lc:LayoutContext}:Dimension
Methods inherited from ShapeBox: add, add-shape-graphic-child, after-reposition, allocate-layout-object, before-reposition, clear, draw, get-current-draw-transformation, 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, set-size, shape-container-pick-child
Methods inherited from 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, request-pointer-trace, swap-children, validate-layout-sequence-numbers
Methods inherited from BasicBox: contains-point?, find-graphic-at, pointer-enter-occurred, pointer-leave-occurred
Methods inherited from ShapeContainerBase: 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
Methods inherited from GetBoundsBox: get-bounds, get-elastic-bounds-into, get-nonparent-bounds-into, request-layout, validate-layout
Methods inherited from Visual: add-from-init-args, add-option, add-style-option, animate, change-cursor, clonable-appearance?, clone-appearance, clone-appearance-helper, 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, release-key-focus, remove-option, remove-style-option, 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
Methods inherited from 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
Methods inherited from GraphicOptions: any-to-Distance, get-display-context
Methods inherited from GuiEventTarget: 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-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
Methods inherited from Graphic: create-pagination-state, detach, draw-range-as-selected, draw-shadow, find-ancestor, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, 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
Methods inherited from DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
Methods inherited from EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
Methods inherited from OptionListInterface: 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-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
Methods inherited from BasicEventTarget: enqueue-event
Methods inherited from InitRestArgParser: process-rest-args
Methods inherited from Object: object-describe, object-describe-for-debugging, object-serialize

Constructor Details
default (constructor)
public {ChartBox.default ...}

Constructs a new ChartBox.

...: The rest arguments may be Shapes, usually Charts to add to the ChartBox, event handlers, or graphical option initializations.
Introduced in: version 6.0


Property DetailsMethod Details
constrain-height (method)
public {ChartBox.constrain-height
    lc:LayoutContext,
    ascent:Distance,
    descent:Distance
}:Dimension

Return the width preference of this Graphic when subjected to a specified height constraint.

lc: the LayoutContext in effect for this layout negotiation.
ascent, descent: the height constraint, expressed as ascent and descent distances relative to the origin of this Graphic.

Returns

a Dimension expressing this object's width preference. This Dimension will be converted to an OriginElastic during subsequent layout processing.

Overriding

The default method Graphic.constrain-height simply invokes Graphic.get-width-preference. This method need not be overridden unless an object needs to take the height constraint into account in computing its width preference.

Classes overriding this method should take care to return a Dimension which represents the space along the horizontal axis which is required, including how it relates to their object's origin. In practice, this means that this method should return either an appropriate OriginElastic, or a Dimension which will be converted to an appropriate OriginElastic via the conversion rules described in Converting Dimensions to OriginElastics.

Important note: Any overriding implementation of this method must include a call to the superclass implementation in order to insure that the layout negotiation is propagated appropriately throughout the entire graphical hierarchy.


constrain-width (method)
public {ChartBox.constrain-width
    lc:LayoutContext,
    lextent:Distance,
    rextent:Distance
}:Dimension

Return the height preference of this Graphic when subjected to a specified width constraint.

lc: the LayoutContext in effect for this layout negotiation.
lextent, rextent: the width constraint, expressed as distances to the left and right relative to the origin.

Returns

a Dimension expressing this object's height preference. This Dimension will be converted to an OriginElastic during subsequent layout operations.

Overriding

The default method Graphic.constrain-width simply invokes Graphic.get-height-preference. This method need not be overridden unless an object needs to take the width constraint into account in computing its height preference.

Classes overriding this method should take care to return a Dimension which represents the space along the vertical axis which is required, including how it relates to their object's origin. In practice, this means that this method should return either an appropriate OriginElastic, or a Dimension which will be converted to an appropriate OriginElastic via the conversion rules described in Converting Dimensions to OriginElastics.

Important note: Any overriding implementation of this method must include a call to the superclass implementation in order to insure that the layout negotiation is propagated appropriately throughout the entire graphical hierarchy.


get-height-preference (method)
public {ChartBox.get-height-preference lc:LayoutContext}:Dimension

Return the height preference of this Graphic.

lc: the LayoutContext in effect for this layout negotiation.

Returns

a Dimension expressing this object's height preference. This Dimension will be converted to an OriginElastic during subsequent layout operations.

Overriding

This method must be defined in a subclass of Graphic.

Classes overriding this method should take care to return a Dimension which represents the space along the vertical axis which is desired, including how it relates to their object's origin. In practice, this means that this method should return either an appropriate OriginElastic, or a Dimension which will be converted to an appropriate OriginElastic via the conversion rules described in Converting Dimensions to OriginElastics.


get-width-preference (method)
public {ChartBox.get-width-preference lc:LayoutContext}:Dimension

Return the width preference of this Graphic.

lc: the LayoutContext in effect for this layout negotiation.

Returns

a Dimension expressing this object's width preference. This Dimension will be converted to an OriginElastic during subsequent layout operations.

Overriding

This method must be defined in a subclass of Graphic.

Classes overriding this method should take care to return a Dimension which represents the space along the horizontal axis which is desired, including how it relates to their object's origin. In practice, this means that this method should return either an appropriate OriginElastic, or a Dimension which will be converted to an appropriate OriginElastic via the conversion rules described in Converting Dimensions to OriginElastics