ObjectPropertyBag
Constructors
new ObjectPropertyBag()
new ObjectPropertyBag(
source,x):ObjectPropertyBag
Parameters
| Parameter | Type | Default value |
|---|---|---|
source | any | undefined |
x | any | null |
Returns
Source
Properties
| Property | Type |
|---|---|
source | any |
Methods
get()
get(
propertyName):object
Gets the value of the specified property
Parameters
| Parameter | Type | Description |
|---|---|---|
propertyName | string |
Returns
object
Source
getProperties()
getProperties():
Property[]
Returns
Property[]
Source
getProperty()
getProperty(
name):Property
Gets property by name (case-sensitive).
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string |
Returns
Source
hasProperty()
hasProperty(
name):boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string |
Returns
boolean
Source
resetDefault()
resetDefault():
void
Clears the previously remembered default settings for viewers of this type. See also: [setDefault]
Returns
void
Source
set()
set(
propertyName,propertyValue):void
Sets the value of the specified property
Parameters
| Parameter | Type | Description |
|---|---|---|
propertyName | string | |
propertyValue | object |
Returns
void
Source
setAll()
setAll(
params):void
Sets all properties according to the passed object containing key-value pairs
Parameters
| Parameter | Type |
|---|---|
params | object |
Returns
void
Source
setDefault()
setDefault(
data,style):void
Sets the current state of viewer properties as the default configuration used to create new viewer instances of this type. Equivalent to the "Pick Up / Apply | Set as Default" context menu command. Read more about viewer commands: https://datagrok.ai/help/visualize/viewers/#common-actions
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
data | boolean | false | indicates if data settings should be copied. |
style | boolean | true | indicates if style (non-data) settings should be copied. |
Returns
void
Source
setDefaultProperty()
staticsetDefaultProperty(viewerType,propertyName,propertyValue):void
Parameters
| Parameter | Type |
|---|---|
viewerType | string |
propertyName | string |
propertyValue | any |
Returns
void