Skip to main content

EntityMetaDartProxy

Defined in: ui.ts:1845

Override the corresponding methods, and register an instance to let Datagrok know how to handle objects of the specified type.

isApplicable is used to associate an object with the handler. When handling an object x, the platform uses the first registered handler that claims that it is applicable to that object.

TODO: search, destructuring to properties

Example: https://public.datagrok.ai/js/samples/ui/handlers/handlers

Extends

Constructors

Constructor

new EntityMetaDartProxy(d): EntityMetaDartProxy

Defined in: ui.ts:1847

Parameters

ParameterType
dany

Returns

EntityMetaDartProxy

Overrides

ObjectHandler.constructor

Properties

PropertyTypeInherited fromDefined in
dartanyObjectHandler.dartui.ts:1682

Accessors

helpUrl

Get Signature

get helpUrl(): string | null

Defined in: ui.ts:1689

URL of help page for the object that this meta handles.

Returns

string | null

Inherited from

ObjectHandler.helpUrl


markupRegexp

Get Signature

get markupRegexp(): string | null

Defined in: ui.ts:1786

Creates a regexp for detecting markup descriptions of an object

Returns

string | null

Inherited from

ObjectHandler.markupRegexp


name

Get Signature

get name(): string

Defined in: ui.ts:1693

Returns

string

Inherited from

ObjectHandler.name


regexpExample

Get Signature

get regexpExample(): { example: string; nonVariablePart: string; regexpMarkup: string; } | null

Defined in: ui.ts:1702

Will be used by search providers to get suggestions (like chembl which has regexp matcher) For something like CHEMBL object handler, it should return: regexpMarkup: 'CHEMBL[0-9]+', example: 'CHEMBL1234', nonVariablePart: 'CHEMBL'

Returns

{ example: string; nonVariablePart: string; regexpMarkup: string; } | null

Inherited from

ObjectHandler.regexpExample


type

Get Signature

get type(): string

Defined in: ui.ts:1852

Type of the object that this meta handles.

Returns

string

Overrides

ObjectHandler.type

Methods

fromMarkup()

fromMarkup(matches): any

Defined in: ui.ts:1781

Extract object from parsed markup description

Parameters

ParameterType
matchesstring[]

Returns

any

Inherited from

ObjectHandler.fromMarkup


getById()

getById(id): Promise<any>

Defined in: ui.ts:1706

Parameters

ParameterType
idstring

Returns

Promise<any>

Inherited from

ObjectHandler.getById


getCanvasRenderer()

getCanvasRenderer(): CanvasRenderer | null

Defined in: ui.ts:1729

Returns

CanvasRenderer | null

Inherited from

ObjectHandler.getCanvasRenderer


getCaption()

getCaption(x): string

Defined in: ui.ts:1854

String representation of the [item], by default item.toString().

Parameters

ParameterTypeDescription
xanyitem

Returns

string

Overrides

ObjectHandler.getCaption


getGridCellRenderer()

getGridCellRenderer(): GridCellRenderer<any> | null

Defined in: ui.ts:1734

Returns

GridCellRenderer<any> | null

Inherited from

ObjectHandler.getGridCellRenderer


init()

init(): void

Defined in: ui.ts:1791

Gets called once upon the registration of meta export class.

Returns

void

Inherited from

ObjectHandler.init


isApplicable()

isApplicable(x): boolean

Defined in: ui.ts:1853

Override this method to check whether this meta class should handle the specified object.

Parameters

ParameterTypeDescription
xanyspecified object.

Returns

boolean

Overrides

ObjectHandler.isApplicable


refresh()

refresh(x): Promise<any>

Defined in: ui.ts:1710

Parameters

ParameterType
xany

Returns

Promise<any>

Inherited from

ObjectHandler.refresh


registerParamFunc()

registerParamFunc(name, run): void

Defined in: ui.ts:1839

Registers a function that takes applicable objects as the only argument. It will be suggested to run in the context menu for that object, and also in the "Actions" pane on the context panel.

Example: https://public.datagrok.ai/js/samples/ui/docking/docking

Parameters

ParameterTypeDescription
namestringfunction name
run(param) => anya function that takes exactly one parameter

Returns

void

Inherited from

ObjectHandler.registerParamFunc


renderCard()

renderCard(x, context?): HTMLDivElement

Defined in: ui.ts:1859

Renders card div for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler.renderCard


renderIcon()

renderIcon(x, context?): HTMLDivElement

Defined in: ui.ts:1856

Renders icon for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler.renderIcon


renderMarkup()

renderMarkup(x, context?): HTMLDivElement

Defined in: ui.ts:1857

Renders markup for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler.renderMarkup


renderPreview()

renderPreview(x, params?, path?): Promise<View>

Defined in: ui.ts:1764

Renders preview list for the item.

Parameters

ParameterType
xany
params?any
path?string

Returns

Promise<View>

Inherited from

ObjectHandler.renderPreview


renderProperties()

renderProperties(x, context?): HTMLDivElement

Defined in: ui.ts:1860

Renders properties list for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler.renderProperties


renderTooltip()

renderTooltip(x, context?): HTMLDivElement

Defined in: ui.ts:1858

Renders tooltip for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler.renderTooltip


renderView()

renderView(x, context?): HTMLDivElement

Defined in: ui.ts:1861

Renders view for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler.renderView


toMarkup()

toMarkup(T): string | null

Defined in: ui.ts:1776

Converts object to its markup description

Parameters

ParameterType
Tany

Returns

string | null

Inherited from

ObjectHandler.toMarkup


toString()

toString(): string

Defined in: ui.ts:1695

Returns

string

Inherited from

ObjectHandler.toString


forEntity()

static forEntity(object, context?): ObjectHandler<any> | null

Defined in: ui.ts:1814

Parameters

ParameterTypeDefault value
objectanyundefined
contextanynull

Returns

ObjectHandler<any> | null

Inherited from

ObjectHandler.forEntity


forSemType()

static forSemType(semType): Promise<ObjectHandler<any>[]>

Defined in: ui.ts:1825

Parameters

ParameterType
semTypestring

Returns

Promise<ObjectHandler<any>[]>

Inherited from

ObjectHandler.forSemType


list()

static list(): ObjectHandler<any>[]

Defined in: ui.ts:1806

All registered handlers

Returns

ObjectHandler<any>[]

Inherited from

ObjectHandler.list


onResolve()

static onResolve(observer): Subscription

Defined in: ui.ts:1810

Parameters

ParameterType
observerPartialObserver<ObjectHandlerResolutionArgs>

Returns

Subscription

Inherited from

ObjectHandler.onResolve


register()

static register(meta): void

Defined in: ui.ts:1794

Registers entity handler.

Parameters

ParameterType
metaObjectHandler

Returns

void

Inherited from

ObjectHandler.register