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
Parameter | Type |
---|---|
d | any |
Returns
Overrides
Source
Properties
Property | Type |
---|---|
dart | any |
Accessors
helpUrl
get
helpUrl():null
|string
URL of help page for the object that this meta handles.
Returns
null
| string
Source
markupRegexp
get
markupRegexp():null
|string
Creates a regexp for detecting markup descriptions of an object
Returns
null
| string
Source
name
get
name():string
Returns
string
Source
type
get
type():string
Type of the object that this meta handles.
Returns
string
Source
Methods
fromMarkup()
fromMarkup(
matches
):any
Extract object from parsed markup description
Parameters
Parameter | Type |
---|---|
matches | string [] |
Returns
any
Inherited from
Source
getById()
getById(
id
):Promise
<any
>
Parameters
Parameter | Type |
---|---|
id | string |
Returns
Promise
<any
>
Inherited from
Source
getCanvasRenderer()
getCanvasRenderer():
null
|CanvasRenderer
Returns
null
| CanvasRenderer
Inherited from
ObjectHandler
. getCanvasRenderer
Source
getCaption()
getCaption(
x
):string
String representation of the [item], by default item.toString().
Parameters
Parameter | Type | Description |
---|---|---|
x | any | item |
Returns
string
Overrides
Source
getGridCellRenderer()
getGridCellRenderer():
null
|GridCellRenderer
Returns
null
| GridCellRenderer
Inherited from
ObjectHandler
. getGridCellRenderer
Source
init()
init():
void
Gets called once upon the registration of meta export class.
Returns
void
Inherited from
Source
isApplicable()
isApplicable(
x
):boolean
Override this method to check whether this meta class should handle the specified object.
Parameters
Parameter | Type | Description |
---|---|---|
x | any | specified object. |
Returns
boolean
Overrides
Source
refresh()
refresh(
x
):Promise
<any
>
Parameters
Parameter | Type |
---|---|
x | any |
Returns
Promise
<any
>
Inherited from
Source
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
Parameter | Type | Description |
---|---|---|
name | string | function name |
run | (param ) => any | a function that takes exactly one parameter |
Returns
void
Inherited from
ObjectHandler
. registerParamFunc
Source
renderCard()
renderCard(
x
,context
):HTMLDivElement
Renders card div for the item.
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
context | any | null |
Returns
HTMLDivElement
Overrides
Source
renderIcon()
renderIcon(
x
,context
):HTMLDivElement
Renders icon for the item.
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
context | any | null |
Returns
HTMLDivElement
Overrides
Source
renderMarkup()
renderMarkup(
x
,context
):HTMLDivElement
Renders markup for the item.
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
context | any | null |
Returns
HTMLDivElement
Overrides
Source
renderPreview()
renderPreview(
x
,context
):View
Renders preview list for the item.
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
context | any | null |
Returns
Inherited from
Source
renderProperties()
renderProperties(
x
,context
):HTMLDivElement
Renders properties list for the item.
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
context | any | null |
Returns
HTMLDivElement
Overrides
ObjectHandler
. renderProperties
Source
renderTooltip()
renderTooltip(
x
,context
):HTMLDivElement
Renders tooltip for the item.
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
context | any | null |
Returns
HTMLDivElement
Overrides
Source
renderView()
renderView(
x
,context
):HTMLDivElement
Renders view for the item.
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
context | any | null |
Returns
HTMLDivElement
Overrides
Source
toMarkup()
toMarkup(
x
):null
|string
Converts object to its markup description
Parameters
Parameter | Type |
---|---|
x | any |
Returns
null
| string
Inherited from
Source
toString()
toString():
string
Returns
string
Inherited from
Source
forEntity()
static
forEntity(object
,context
):null
|ObjectHandler
Parameters
Parameter | Type | Default value |
---|---|---|
object | any | undefined |
context | any | null |
Returns
null
| ObjectHandler
Inherited from
Source
forSemType()
static
forSemType(semType
):Promise
<ObjectHandler
[]>
Parameters
Parameter | Type |
---|---|
semType | string |
Returns
Promise
<ObjectHandler
[]>
Inherited from
Source
list()
static
list():ObjectHandler
[]
Returns
Inherited from
Source
onResolve()
static
onResolve(observer
):Subscription
Parameters
Parameter | Type |
---|---|
observer | PartialObserver <ObjectHandlerResolutionArgs > |
Returns
Subscription
Inherited from
Source
register()
static
register(meta
):void
Registers entity handler.
Parameters
Parameter | Type |
---|---|
meta | ObjectHandler |
Returns
void