EntityProperty
Strongly-typed property associated with an object. Used for reflection, serialization, UI generation, and other introspection-dependent tasks.
Samples:
Extends
Constructors
new EntityProperty()
new EntityProperty(
dart):EntityProperty
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Overrides
Source
Properties
| Property | Modifier | Type | Default value | Description | Inherited from |
|---|---|---|---|---|---|
dart | readonly | any | undefined | - | Property.dart |
options | public | any | undefined | Additional options. | Property.options |
propertyOptions | static | object | ... | - | Property.propertyOptions |
propertyOptions.caption? | public | IProperty & IPropertyMeta | undefined | Custom field caption shown in [PropertyGrid] Deprecated The property will be removed soon. Use friendlyName instead | - |
propertyOptions.category? | public | IProperty & IPropertyMeta | undefined | Corresponding category on the context panel | - |
propertyOptions.choices? | public | IProperty & IPropertyMeta | undefined | List of choices. Applicable to string properties only | - |
propertyOptions.columnTypeFilter? | public | IProperty & IPropertyMeta | undefined | Filter for columns, can be numerical, categorical or directly a column type (string, int...) Applicable when type = Column | - |
propertyOptions.defaultValue? | public | IProperty & IPropertyMeta | undefined | Default value used for deserialization and cloning. See also initialValue. | - |
propertyOptions.description? | public | IProperty & IPropertyMeta | undefined | Property description | - |
propertyOptions.editor? | public | IProperty & IPropertyMeta | undefined | Custom editor (such as slider or text area) | - |
propertyOptions.fieldName? | public | IProperty & IPropertyMeta | undefined | Name of the corresponding JavaScript field. No need to specify it if it is the same as name. | - |
propertyOptions.format? | public | IProperty & IPropertyMeta | undefined | Value format, such as '0.000' | - |
propertyOptions.friendlyName? | public | IProperty & IPropertyMeta | undefined | Custom field friendly name shown in [PropertyGrid] | - |
propertyOptions.initialValue? | public | IProperty & IPropertyMeta | undefined | Initial value used when initializing UI. See also defaultValue | - |
propertyOptions.inputType? | public | IProperty & IPropertyMeta | undefined | Property input type | - |
propertyOptions.max? | public | IProperty & IPropertyMeta | undefined | Maximum value. Applicable to numerical properties only | - |
propertyOptions.min? | public | IProperty & IPropertyMeta | undefined | Minimum value. Applicable to numerical properties only | - |
propertyOptions.name? | public | IProperty & IPropertyMeta | undefined | Property name | - |
propertyOptions.nullable? | public | IProperty & IPropertyMeta | undefined | Whether an empty value is allowed. This is used by validators. | - |
propertyOptions.options? | public | IProperty & IPropertyMeta | undefined | Additional options. | - |
propertyOptions.semType? | public | IProperty & IPropertyMeta | undefined | Semantic type | - |
propertyOptions.showPlusMinus? | public | IProperty & IPropertyMeta | undefined | Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only. | - |
propertyOptions.showSlider? | public | IProperty & IPropertyMeta | undefined | Whether a slider appears next to the number input. Applies to numerical columns only. | - |
propertyOptions.step? | public | IProperty & IPropertyMeta | undefined | Step to be used in a slider. Only applies to numerical properties. | - |
propertyOptions.tags? | public | IProperty & IPropertyMeta | undefined | - | - |
propertyOptions.type? | public | IProperty & IPropertyMeta | undefined | Property data type. See TYPE. | - |
propertyOptions.units? | public | IProperty & IPropertyMeta | undefined | Units of measurement. See also: [postfix] | - |
propertyOptions.userEditable? | public | IProperty & IPropertyMeta | undefined | Whether the property should be editable via the UI | - |
propertyOptions.validators? | public | IProperty & IPropertyMeta | undefined | 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? | public | IProperty & IPropertyMeta | undefined | List of value validators (functions that take a value and return error message or null) | - |
propertyOptions.viewer? | public | IProperty & IPropertyMeta | undefined | - | - |
Accessors
caption
getcaption():string
Custom field caption shown in the UI
Deprecated
The property will be removed soon. Use friendlyName instead
setcaption(s):void
Custom field caption shown in [PropertyGrid]
Deprecated
The property will be removed soon. Use friendlyName instead
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
category
getcategory():string
Property category
setcategory(s):void
Corresponding category on the context panel
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
choices
getchoices():string[]
List of possible values of that property. PropertyGrid will use it to populate combo boxes.
setchoices(x):void
List of choices. Applicable to string properties only
Parameters
| Parameter | Type |
|---|---|
x | string[] |
Returns
string[]
Source
columnTypeFilter
getcolumnTypeFilter():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
defaultValue
getdefaultValue():any
Default value
setdefaultValue(s):void
Default value used for deserialization and cloning. See also initialValue.
Parameters
| Parameter | Type |
|---|---|
s | any |
Returns
any
Source
description
getdescription():string
Description
setdescription(s):void
Property description
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
editor
geteditor():string
Property editor
seteditor(s):void
Custom editor (such as slider or text area)
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
format
getformat():string
Format to be used for displaying the value.
setformat(s):void
Value format, such as '0.000'
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
friendlyName
getfriendlyName():string
Custom field caption shown in the UI
setfriendlyName(s):void
Custom field friendly name shown in [PropertyGrid]
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
get
getget():PropertyGetter<any,any>
Property getter is a function that accepts one parameter (item) and returns the property value.
setget(x):void
Parameters
| Parameter | Type |
|---|---|
x | PropertyGetter<any, any> |
Returns
PropertyGetter<any, any>
Source
includeInLayout
getincludeInLayout():boolean
Applies to viewers properties whether to include the property in the layout or not.
setincludeInLayout(s):void
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
boolean
Source
initialValue
getinitialValue():string
Initial value used when initializing UI
setinitialValue(s):void
Initial value used when initializing UI. See also defaultValue
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
inputType
getinputType():string
Input type. See also InputType
setinputType(s):void
Property input type
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
isVectorizable
getisVectorizable():boolean
Returns
boolean
Source
max
getmax():number
Maximum value. Used when constructing UI (sliders), validating, etc.
setmax(s):void
Maximum value. Applicable to numerical properties only
Parameters
| Parameter | Type |
|---|---|
s | number |
Returns
number
Source
min
getmin():number
Minimum value. Used when constructing UI (sliders), validating, etc.
setmin(s):void
Minimum value. Applicable to numerical properties only
Parameters
| Parameter | Type |
|---|---|
s | number |
Returns
number
Source
name
getname():string
Property name
setname(s):void
Property name
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
nullable
getnullable():boolean
Nullable
setnullable(s):void
Whether an empty value is allowed. This is used by validators.
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
boolean
Source
propertySubType
getpropertySubType():TYPE
Property subtype
Returns
Source
propertyType
getpropertyType():TYPE
Property type. Same as type
setpropertyType(s):void
Parameters
| Parameter | Type |
|---|---|
s | TYPE |
Returns
Source
semType
getsemType():string
Semantic type
setsemType(s):void
Semantic type
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
set
getset():PropertySetter<any,any>
Property setter
setset(x):void
Parameters
| Parameter | Type |
|---|---|
x | PropertySetter<any, any> |
Returns
PropertySetter<any, any>
Source
showPlusMinus
getshowPlusMinus():boolean
Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.
setshowPlusMinus(s):void
Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
boolean
Source
showSlider
getshowSlider():boolean
Whether a slider appears next to the number input. Applies to numerical columns only.
setshowSlider(s):void
Whether a slider appears next to the number input. Applies to numerical columns only.
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
boolean
Source
step
getstep():number
Step to be used in a slider. Only applies to numerical properties.
setstep(s):void
Step to be used in a slider. Only applies to numerical properties.
Parameters
| Parameter | Type |
|---|---|
s | number |
Returns
number
Source
type
gettype():TYPE
Property type. Same as propertyType
settype(s):void
Property data type. See TYPE.
Parameters
| Parameter | Type |
|---|---|
s | TYPE |
Returns
Source
units
getunits():string
Units of measurement.
setunits(s):void
Units of measurement. See also: [postfix]
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
userEditable
getuserEditable():boolean
Whether a user can edit this property from the UI.
setuserEditable(s):void
Whether the property should be editable via the UI
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
boolean
Source
validators
getvalidators():string[]
Validation conditions to be checked when editing the property. See also PropertyValidator.
setvalidators(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
| Parameter | Type |
|---|---|
x | string[] |
Returns
string[]
Source
vectorName
getvectorName():string
Returns
string
Source
Methods
fromOptions()
fromOptions(
opt?):Property
Applies the specified options
Parameters
| Parameter | Type |
|---|---|
opt? | IProperty |
Returns
Inherited from
Source
bool()
staticbool(name,getter,setter,defaultValue):Property
Creates a bool property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter<any, any> |
setter | PropertySetter<any, any> |
defaultValue | any |
Returns
Inherited from
Source
create()
staticcreate(name,type):EntityProperty
Creates a property
Parameters
| Parameter | Type |
|---|---|
name | string |
type | string |
Returns
Overrides
Source
dateTime()
staticdateTime(name,getter,setter,defaultValue):Property
Creates a datetime property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter<any, any> |
setter | PropertySetter<any, any> |
defaultValue | any |
Returns
Inherited from
Source
float()
staticfloat(name,getter,setter,defaultValue):Property
Creates a float property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter<any, any> |
setter | PropertySetter<any, any> |
defaultValue | any |
Returns
Inherited from
Source
fromOptions()
staticfromOptions(options):Property
Parameters
| Parameter | Type |
|---|---|
options | IProperty |
Returns
Inherited from
Source
int()
staticint(name,getter,setter,defaultValue):Property
Creates an integer property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter<any, any> |
setter | PropertySetter<any, any> |
defaultValue | any |
Returns
Inherited from
Source
js()
staticjs(name,type,options?):Property
Creates property for the JavaScript objects with the corresponding property name
Parameters
| Parameter | Type |
|---|---|
name | string |
type | TYPE |
options? | IProperty |
Returns
Inherited from
Source
jsBool()
staticjsBool(name,options?):Property
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
Source
jsDateTime()
staticjsDateTime(name,options?):Property
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
Source
jsFloat()
staticjsFloat(name,options?):Property
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
Source
jsInt()
staticjsInt(name,options?):Property
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
Source
jsString()
staticjsString(name,options?):Property
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
Source
registerAttachedProperty()
staticregisterAttachedProperty(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
| Parameter | Type |
|---|---|
typeName | string |
property | Property |
Returns
void
Inherited from
Property . registerAttachedProperty
Source
string()
staticstring(name,getter,setter,defaultValue):Property
Creates a string property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter<any, any> |
setter | PropertySetter<any, any> |
defaultValue | any |