Class: CellRenderers

CellRenderers

Registry of cell renderer singletons.

Constructor

new CellRenderers(privateRegistryopt)

Parameters:
Name Type Attributes Default Description
privateRegistry boolean <optional>
false

This instance will use a private registry.

Methods

add(nameopt, Constructor) → {CellRenderers}

Register and instantiate a singleton.

Adds an item to the registry using the provided name (or the class name), converted to all lower case.

All native cell renderers are "preregistered" in singletons. Add more by calling add.

Parameters:
Name Type Attributes Description
name string <optional>

Case-insensitive renderer key. If not given, YourCellRenderer.prototype.$$CLASS_NAME is used.

Constructor CellRenderer

A constructor, typically extended from CellRenderer (or a descendant therefrom).

Note: $$CLASS_NAME can be easily set up by providing a string as the (optional) first parameter (alias) in your CellEditor.extend call.

Returns:

A newly registered constructor extended from CellRenderers.

Type
CellRenderers

addSynonym(synonymName, existingName) → {CellRenderers}

Register a synonym for an existing item.

Parameters:
Name Type Description
synonymName string
existingName string
Returns:

The previously registered constructor this new synonym points to.

Type
CellRenderers

get(name, noThrowopt) → {CellRenderers}

Fetch a registered singleton.

Parameters:
Name Type Attributes Description
name string
noThrow boolean <optional>

Avoid throwing error if no such item; just return undefined.

Returns:

A registered constructor extended from CellRenderers.

Type
CellRenderers