Skip to main content

Property

Strongly-typed property associated with an object. Used for reflection, serialization, UI generation, and other introspection-dependent tasks.

Samples:

Extended by

Implements

Constructors

new Property()

new Property(dart): Property

Parameters

ParameterType
dartany

Returns

Property

Source

src/entities.ts:1493

Properties

PropertyModifierTypeDefault valueDescription
dartreadonlyanyundefined-
optionspublicanyundefinedAdditional options.
propertyOptionsstaticobject...-
propertyOptions.caption?publicIProperty & IPropertyMetaundefined

Custom field caption shown in [PropertyGrid]

Deprecated

The property will be removed soon. Use friendlyName instead

propertyOptions.category?publicIProperty & IPropertyMetaundefinedCorresponding category on the context panel
propertyOptions.choices?publicIProperty & IPropertyMetaundefinedList of choices. Applicable to string properties only
propertyOptions.columnTypeFilter?publicIProperty & IPropertyMetaundefinedFilter for columns, can be numerical, categorical or directly a column type (string, int...) Applicable when type = Column
propertyOptions.defaultValue?publicIProperty & IPropertyMetaundefinedDefault value used for deserialization and cloning. See also initialValue.
propertyOptions.description?publicIProperty & IPropertyMetaundefinedProperty description
propertyOptions.editor?publicIProperty & IPropertyMetaundefinedCustom editor (such as slider or text area)
propertyOptions.fieldName?publicIProperty & IPropertyMetaundefinedName of the corresponding JavaScript field. No need to specify it if it is the same as name.
propertyOptions.format?publicIProperty & IPropertyMetaundefinedValue format, such as '0.000'
propertyOptions.friendlyName?publicIProperty & IPropertyMetaundefinedCustom field friendly name shown in [PropertyGrid]
propertyOptions.initialValue?publicIProperty & IPropertyMetaundefinedInitial value used when initializing UI. See also defaultValue
propertyOptions.inputType?publicIProperty & IPropertyMetaundefinedProperty input type
propertyOptions.max?publicIProperty & IPropertyMetaundefinedMaximum value. Applicable to numerical properties only
propertyOptions.min?publicIProperty & IPropertyMetaundefinedMinimum value. Applicable to numerical properties only
propertyOptions.name?publicIProperty & IPropertyMetaundefinedProperty name
propertyOptions.nullable?publicIProperty & IPropertyMetaundefinedWhether an empty value is allowed. This is used by validators.
propertyOptions.options?publicIProperty & IPropertyMetaundefinedAdditional options.
propertyOptions.semType?publicIProperty & IPropertyMetaundefinedSemantic type
propertyOptions.showPlusMinus?publicIProperty & IPropertyMetaundefinedWhether a plus/minus clicker appears next to the number input. Applies to numerical columns only.
propertyOptions.showSlider?publicIProperty & IPropertyMetaundefinedWhether a slider appears next to the number input. Applies to numerical columns only.
propertyOptions.step?publicIProperty & IPropertyMetaundefinedStep to be used in a slider. Only applies to numerical properties.
propertyOptions.tags?publicIProperty & IPropertyMetaundefined-
propertyOptions.type?publicIProperty & IPropertyMetaundefinedProperty data type. See TYPE.
propertyOptions.units?publicIProperty & IPropertyMetaundefinedUnits of measurement. See also: [postfix]
propertyOptions.userEditable?publicIProperty & IPropertyMetaundefinedWhether the property should be editable via the UI
propertyOptions.validators?publicIProperty & IPropertyMetaundefined

List of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): string | null.

[null] indicates that the value is valid, [string] describes a validation error.

propertyOptions.valueValidators?publicIProperty & IPropertyMetaundefinedList of value validators (functions that take a value and return error message or null)
propertyOptions.viewer?publicIProperty & IPropertyMetaundefined-

Accessors

caption

get caption(): string

Custom field caption shown in the UI

Deprecated

The property will be removed soon. Use friendlyName instead

set caption(s): void

Custom field caption shown in [PropertyGrid]

Deprecated

The property will be removed soon. Use friendlyName instead

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1515


category

get category(): string

Property category

set category(s): void

Corresponding category on the context panel

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1523


choices

get choices(): string[]

List of possible values of that property. PropertyGrid will use it to populate combo boxes.

set choices(x): void

List of choices. Applicable to string properties only

Parameters

ParameterType
xstring[]

Returns

string[]

Source

src/entities.ts:1604


columnTypeFilter

get columnTypeFilter(): null | "string" | "bigint" | "object" | "int" | "double" | "bool" | "byte_array" | "datetime" | "qnum" | "dataframe" | "categorical" | "numerical"

Column type filter (previously "columnFilter")

Returns

null | "string" | "bigint" | "object" | "int" | "double" | "bool" | "byte_array" | "datetime" | "qnum" | "dataframe" | "categorical" | "numerical"

Source

src/entities.ts:1617


defaultValue

get defaultValue(): any

Default value

set defaultValue(s): void

Default value used for deserialization and cloning. See also initialValue.

Parameters

ParameterType
sany

Returns

any

Source

src/entities.ts:1562


description

get description(): string

Description

set description(s): void

Property description

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1550


editor

get editor(): string

Property editor

set editor(s): void

Custom editor (such as slider or text area)

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1566


format

get format(): string

Format to be used for displaying the value.

set format(s): void

Value format, such as '0.000'

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1574


friendlyName

get friendlyName(): string

Custom field caption shown in the UI

set friendlyName(s): void

Custom field friendly name shown in [PropertyGrid]

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1519


get

get get(): PropertyGetter<any, any>

Property getter is a function that accepts one parameter (item) and returns the property value.

set get(x): void

Parameters

ParameterType
xPropertyGetter<any, any>

Returns

PropertyGetter<any, any>

Source

src/entities.ts:1502


includeInLayout

get includeInLayout(): boolean

Applies to viewers properties whether to include the property in the layout or not.

set includeInLayout(s): void

Parameters

ParameterType
sboolean

Returns

boolean

Source

src/entities.ts:1538


initialValue

get initialValue(): string

Initial value used when initializing UI

set initialValue(s): void

Initial value used when initializing UI. See also defaultValue

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1558


inputType

get inputType(): string

Input type. See also InputType

set inputType(s): void

Property input type

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1546


isVectorizable

get isVectorizable(): boolean

Returns

boolean

Source

src/entities.ts:1612


max

get max(): number

Maximum value. Used when constructing UI (sliders), validating, etc.

set max(s): void

Maximum value. Applicable to numerical properties only

Parameters

ParameterType
snumber

Returns

number

Source

src/entities.ts:1586


min

get min(): number

Minimum value. Used when constructing UI (sliders), validating, etc.

set min(s): void

Minimum value. Applicable to numerical properties only

Parameters

ParameterType
snumber

Returns

number

Source

src/entities.ts:1582


name

get name(): string

Property name

set name(s): void

Property name

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1510


nullable

get nullable(): boolean

Nullable

set nullable(s): void

Whether an empty value is allowed. This is used by validators.

Parameters

ParameterType
sboolean

Returns

boolean

Source

src/entities.ts:1554


propertySubType

get propertySubType(): TYPE

Property subtype

Returns

TYPE

Source

src/entities.ts:1535


propertyType

get propertyType(): TYPE

Property type. Same as type

set propertyType(s): void

Parameters

ParameterType
sTYPE

Returns

TYPE

Source

src/entities.ts:1531


semType

get semType(): string

Semantic type

set semType(s): void

Semantic type

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1542


set

get set(): PropertySetter<any, any>

Property setter

set set(x): void

Parameters

ParameterType
xPropertySetter<any, any>

Returns

PropertySetter<any, any>

Source

src/entities.ts:1506


showPlusMinus

get showPlusMinus(): boolean

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

set showPlusMinus(s): void

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

Parameters

ParameterType
sboolean

Returns

boolean

Source

src/entities.ts:1598


showSlider

get showSlider(): boolean

Whether a slider appears next to the number input. Applies to numerical columns only.

set showSlider(s): void

Whether a slider appears next to the number input. Applies to numerical columns only.

Parameters

ParameterType
sboolean

Returns

boolean

Source

src/entities.ts:1594


step

get step(): number

Step to be used in a slider. Only applies to numerical properties.

set step(s): void

Step to be used in a slider. Only applies to numerical properties.

Parameters

ParameterType
snumber

Returns

number

Source

src/entities.ts:1590


type

get type(): TYPE

Property type. Same as propertyType

set type(s): void

Property data type. See TYPE.

Parameters

ParameterType
sTYPE

Returns

TYPE

Source

src/entities.ts:1527


units

get units(): string

Units of measurement.

set units(s): void

Units of measurement. See also: [postfix]

Parameters

ParameterType
sstring

Returns

string

Source

src/entities.ts:1570


userEditable

get userEditable(): boolean

Whether a user can edit this property from the UI.

set userEditable(s): void

Whether the property should be editable via the UI

Parameters

ParameterType
sboolean

Returns

boolean

Source

src/entities.ts:1578


validators

get validators(): string[]

Validation conditions to be checked when editing the property. See also PropertyValidator.

set validators(x): void

List of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): string | null. [null] indicates that the value is valid, [string] describes a validation error.

Parameters

ParameterType
xstring[]

Returns

string[]

Source

src/entities.ts:1609


vectorName

get vectorName(): string

Returns

string

Source

src/entities.ts:1614

Methods

fromOptions()

fromOptions(opt?): Property

Applies the specified options

Parameters

ParameterType
opt?IProperty

Returns

Property

Source

src/entities.ts:1622


bool()

static bool(name, getter, setter, defaultValue): Property

Creates a bool property

Parameters

ParameterType
namestring
getterPropertyGetter<any, any>
setterPropertySetter<any, any>
defaultValueany

Returns

Property

Source

src/entities.ts:1652


create()

static create(name, type, getter, setter, defaultValue): Property

Creates a property

Parameters

ParameterTypeDefault value
namestringundefined
type"string" | "bigint" | "object" | "map" | "file" | "view" | "blob" | "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
getterPropertyGetter<any, any>undefined
setterPropertySetter<any, any>undefined
defaultValueanynull

Returns

Property

Source

src/entities.ts:1629


dateTime()

static dateTime(name, getter, setter, defaultValue): Property

Creates a datetime property

Parameters

ParameterType
namestring
getterPropertyGetter<any, any>
setterPropertySetter<any, any>
defaultValueany

Returns

Property

Source

src/entities.ts:1657


float()

static float(name, getter, setter, defaultValue): Property

Creates a float property

Parameters

ParameterType
namestring
getterPropertyGetter<any, any>
setterPropertySetter<any, any>
defaultValueany

Returns

Property

Source

src/entities.ts:1642


fromOptions()

static fromOptions(options): Property

Parameters

ParameterType
optionsIProperty

Returns

Property

Source

src/entities.ts:1675


int()

static int(name, getter, setter, defaultValue): Property

Creates an integer property

Parameters

ParameterType
namestring
getterPropertyGetter<any, any>
setterPropertySetter<any, any>
defaultValueany

Returns

Property

Source

src/entities.ts:1637


js()

static js(name, type, options?): Property

Creates property for the JavaScript objects with the corresponding property name

Parameters

ParameterType
namestring
typeTYPE
options?IProperty

Returns

Property

Source

src/entities.ts:1662


jsBool()

static jsBool(name, options?): Property

Parameters

ParameterType
namestring
options?IProperty

Returns

Property

Source

src/entities.ts:1670


jsDateTime()

static jsDateTime(name, options?): Property

Parameters

ParameterType
namestring
options?IProperty

Returns

Property

Source

src/entities.ts:1673


jsFloat()

static jsFloat(name, options?): Property

Parameters

ParameterType
namestring
options?IProperty

Returns

Property

Source

src/entities.ts:1671


jsInt()

static jsInt(name, options?): Property

Parameters

ParameterType
namestring
options?IProperty

Returns

Property

Source

src/entities.ts:1669


jsString()

static jsString(name, options?): Property

Parameters

ParameterType
namestring
options?IProperty

Returns

Property

Source

src/entities.ts:1672


registerAttachedProperty()

static registerAttachedProperty(typeName, property): void

Registers the attached (dynamic) property for the specified type. It is editable via the context panel, and gets saved into the view layout as well. Property getter/setter typically uses Widget's "temp" property for storing the value.

Parameters

ParameterType
typeNamestring
propertyProperty

Returns

void

Source

src/entities.ts:1680


string()

static string(name, getter, setter, defaultValue): Property

Creates a string property

Parameters

ParameterType
namestring
getterPropertyGetter<any, any>
setterPropertySetter<any, any>
defaultValueany

Returns

Property

Source

src/entities.ts:1647