Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CellRenderer

An object which renders the cells of a data grid. The namespace for the CellRenderer class statics.

Notes

If the predefined cell renderers are insufficient for a particular use case, a custom cell renderer can be defined which derives from this class.

The data grid renders cells in column-major order, by region. The region order is: body, row header, column header, corner header.

Hierarchy

Index

Type aliases

Static CellConfig

CellConfig: object

An object which holds the configuration data for a cell.

Type declaration

Static ConfigFunc

ConfigFunc<T>: function

A type alias for a cell renderer config function.

This type is used to compute a value from a cell config object.

Type parameters

  • T

Type declaration

Static ConfigOption

ConfigOption<T>: T | ConfigFunc<T>

A type alias for a cell renderer config option.

A config option can be a static value or a config function.

Type parameters

  • T

Methods

Abstract paint

  • Paint the content for a cell.

    Parameters

    • gc: GraphicsContext

      The graphics context to use for drawing.

    • config: CellConfig

      The configuration data for the cell.

      Notes

      The grid will save/restore the gc state before/after invoking the renderer.

      For performance, the cell content is efficiently clipped to the width of the column, but the height is not clipped. If height clipping is needed, the renderer must set up its own clip rect.

      The renderer must not draw outside the cell bounding height.

    Returns void

Static resolveOption

Generated using TypeDoc