Skip to main content

EntityMetaDartProxy

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

new EntityMetaDartProxy()

new EntityMetaDartProxy(d): EntityMetaDartProxy

Parameters

ParameterType
dany

Returns

EntityMetaDartProxy

Overrides

ObjectHandler . constructor

Source

ui.ts:1718

Properties

PropertyTypeInherited from
dartanyObjectHandler.dart

Accessors

helpUrl

get helpUrl(): null | string

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

Returns

null | string

Source

ui.ts:1560


markupRegexp

get markupRegexp(): null | string

Creates a regexp for detecting markup descriptions of an object

Returns

null | string

Source

ui.ts:1657


name

get name(): string

Returns

string

Source

ui.ts:1564


regexpExample

get regexpExample(): null | object

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

null | object

Source

ui.ts:1573


type

get type(): string

Type of the object that this meta handles.

Returns

string

Source

ui.ts:1723

Methods

fromMarkup()

fromMarkup(matches): any

Extract object from parsed markup description

Parameters

ParameterType
matchesstring[]

Returns

any

Inherited from

ObjectHandler . fromMarkup

Source

ui.ts:1652


getById()

getById(id): Promise<any>

Parameters

ParameterType
idstring

Returns

Promise<any>

Inherited from

ObjectHandler . getById

Source

ui.ts:1577


getCanvasRenderer()

getCanvasRenderer(): null | CanvasRenderer

Returns

null | CanvasRenderer

Inherited from

ObjectHandler . getCanvasRenderer

Source

ui.ts:1600


getCaption()

getCaption(x): string

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

Parameters

ParameterTypeDescription
xanyitem

Returns

string

Overrides

ObjectHandler . getCaption

Source

ui.ts:1725


getGridCellRenderer()

getGridCellRenderer(): null | GridCellRenderer<any>

Returns

null | GridCellRenderer<any>

Inherited from

ObjectHandler . getGridCellRenderer

Source

ui.ts:1605


init()

init(): void

Gets called once upon the registration of meta export class.

Returns

void

Inherited from

ObjectHandler . init

Source

ui.ts:1662


isApplicable()

isApplicable(x): boolean

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

Parameters

ParameterTypeDescription
xanyspecified object.

Returns

boolean

Overrides

ObjectHandler . isApplicable

Source

ui.ts:1724


refresh()

refresh(x): Promise<any>

Parameters

ParameterType
xany

Returns

Promise<any>

Inherited from

ObjectHandler . refresh

Source

ui.ts:1581


registerParamFunc()

registerParamFunc(name, run): void

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

Source

ui.ts:1710


renderCard()

renderCard(x, context): HTMLDivElement

Renders card div for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler . renderCard

Source

ui.ts:1730


renderIcon()

renderIcon(x, context): HTMLDivElement

Renders icon for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler . renderIcon

Source

ui.ts:1727


renderMarkup()

renderMarkup(x, context): HTMLDivElement

Renders markup for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler . renderMarkup

Source

ui.ts:1728


renderPreview()

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

Renders preview list for the item.

Parameters

ParameterType
xany
params?any
path?string

Returns

Promise <View>

Inherited from

ObjectHandler . renderPreview

Source

ui.ts:1635


renderProperties()

renderProperties(x, context): HTMLDivElement

Renders properties list for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler . renderProperties

Source

ui.ts:1731


renderTooltip()

renderTooltip(x, context): HTMLDivElement

Renders tooltip for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler . renderTooltip

Source

ui.ts:1729


renderView()

renderView(x, context): HTMLDivElement

Renders view for the item.

Parameters

ParameterTypeDefault value
xanyundefined
contextanynull

Returns

HTMLDivElement

Overrides

ObjectHandler . renderView

Source

ui.ts:1732


toMarkup()

toMarkup(T): null | string

Converts object to its markup description

Parameters

ParameterType
Tany

Returns

null | string

Inherited from

ObjectHandler . toMarkup

Source

ui.ts:1647


toString()

toString(): string

Returns

string

Inherited from

ObjectHandler . toString

Source

ui.ts:1566


forEntity()

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

Parameters

ParameterTypeDefault value
objectanyundefined
contextanynull

Returns

null | ObjectHandler<any>

Inherited from

ObjectHandler . forEntity

Source

ui.ts:1685


forSemType()

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

Parameters

ParameterType
semTypestring

Returns

Promise <ObjectHandler<any>[]>

Inherited from

ObjectHandler . forSemType

Source

ui.ts:1696


list()

static list(): ObjectHandler<any>[]

All registered handlers

Returns

ObjectHandler<any>[]

Inherited from

ObjectHandler . list

Source

ui.ts:1677


onResolve()

static onResolve(observer): Subscription

Parameters

ParameterType
observerPartialObserver <ObjectHandlerResolutionArgs>

Returns

Subscription

Inherited from

ObjectHandler . onResolve

Source

ui.ts:1681


register()

static register(meta): void

Registers entity handler.

Parameters

ParameterType
metaObjectHandler<any>

Returns

void

Inherited from

ObjectHandler . register

Source

ui.ts:1665