Widget<TSettings>
Base class for controls that have a visual root and a set of properties.
Extended by
Type parameters
Type parameter | Value |
---|---|
TSettings | any |
Constructors
new Widget()
new Widget<
TSettings
>(widgetRoot
):Widget
<TSettings
>
Parameters
Parameter | Type |
---|---|
widgetRoot | HTMLElement |
Returns
Widget
<TSettings
>
Constructs
Widget and initializes its root.
Source
Properties
Property | Modifier | Type | Default value | Description |
---|---|---|---|---|
_properties | protected | Property [] | undefined | - |
_root | protected | HTMLElement | undefined | - |
dart | public | any | undefined | - |
factory | public | null | Func | null | Constructor function. No parameters, returns [Widget]. |
isDetached | public | boolean | false | - |
props | public | TSettings & ObjectPropertyBag | undefined | - |
subs | public | Subscription [] | undefined | - |
temp | public | any | undefined | Contains auxiliary information |
Accessors
root
get
root():HTMLElement
Widget's visual root.
set
root(r
):void
Parameters
Parameter | Type |
---|---|
r | HTMLElement |
Returns
HTMLElement
Source
type
get
type():string
Returns
string
Source
Methods
addProperty()
private
addProperty(propertyName
,propertyType
,defaultValue
,options
):any
Registers an property with the specified type, name, and defaultValue.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
propertyName | string | undefined | |
propertyType | "string" | "bigint" | "object" | "map" | "file" | "view" | "int" | "double" | "bool" | "byte_array" | "datetime" | "qnum" | "dataframe" | "num" | "string_list" | "dataframe_list" | "cell" | "column" | "column_list" | "graphics" | "tablerowfiltercall" | "colfiltercall" | "bitset" | "dynamic" | "viewer" | "list" | "semantic_value" | "func" | "funccall" | "property" | "categorical" | "numerical" | "GridCellRenderArgs" | "element" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook" | undefined | |
defaultValue | any | null | |
options | null | object & PropertyOptions | null |
Returns
any
See
Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization
Source
apply()
apply(
properties
):Widget
<any
>
Parameters
Parameter | Type | Description |
---|---|---|
properties | object |
Returns
Widget
<any
>
Source
detach()
detach():
void
Gets called when a widget is detached and will no longer be used. Typically used for unsubscribing from events. Be sure to call super.detach() if this method is overridden.
Returns
void
Source
getDartProperties()
getDartProperties():
any
[]
Returns
any
[]
Source
getProperties()
getProperties():
Property
[]
Returns
Property
[]
Source
onFrameAttached()
onFrameAttached(
dataFrame
):void
Parameters
Parameter | Type |
---|---|
dataFrame | DataFrame |
Returns
void
Source
onPropertyChanged()
onPropertyChanged(
property
):void
Gets called when viewer's property is changed.
Parameters
Parameter | Type | Description |
---|---|---|
property | null | Property | or null, if multiple properties were changed. |
Returns
void
Source
sourceRowsChanged()
sourceRowsChanged():
void
Returns
void
Source
sub()
sub(
subscription
):void
Registers a subscription to an external event.
Parameters
Parameter | Type | Description |
---|---|---|
subscription | Subscription |
Returns
void
Source
toDart()
toDart():
any
Returns
any
Source
find()
static
find(root
):null
|Widget
<any
>
Finds existing widget from its visual root.
Parameters
Parameter | Type |
---|---|
root | Element |
Returns
null
| Widget
<any
>
Source
fromRoot()
static
fromRoot(root
):Widget
<any
>
Creates a new widget from the root element.
Parameters
Parameter | Type |
---|---|
root | HTMLElement |
Returns
Widget
<any
>
Source
getAll()
static
getAll():Widget
<any
>[]
Returns all currently active widgets.
Returns
Widget
<any
>[]