Methods

This section describes the methods that can be used in code to manipulate objects related to the dxBullet widget.

beginUpdate()

Prevents the widget from refreshing until the endUpdate method is called.

The beginUpdate and endUpdate methods allow you to apply several modifications to the widget at once. After the beginUpdate method is called, the widget does not rerender itself until the endUpdate method is called. The usage of these methods prevents excessive widget updating when changing multiple widget settings at once.

NOTE: It is recommended that you do not perform any actions on a widget within the updating transaction other than changing widget options.

endUpdate()

Enables the widget to refresh after the beginUpdate method call.

The beginUpdate and endUpdate methods allow you to apply several modifications to the widget at once. After the beginUpdate method is called, the widget does not rerender itself until the endUpdate method is called. The usage of these methods prevents excessive widget updating when changing multiple widget settings at once.

NOTE: It is recommended that you do not perform any actions on a widget within the updating transaction other than changing widget options.

instance()

Returns an instance of the widget.

Return Value: Object

An instance of the widget.

Use this method to access the widget.

option()

Returns the object representing explicitly specified widget options.

Return Value: Object

Explicitly specified widget options.

Use this method to obtain the object of explicitly specified widget options. To change the value of one widget option, call the option(optionName, optionValue) method. To change values of several options, call the option(options) method.

option(optionName)

Gets the value of an explicitly specified widget option.

Parameters:
optionName: String

The name of the option to get.

Return Value: any

The value of the specified option.

To get the value of a configuration option, specify the path to the field representing this option in the configuration object. For example, pass the "tooltip.enabled" value as the optionName parameter to get the value of the tooltip | enabled option.

NOTE: If the requested option was not specified explicitly, this method returns undefined.

option(optionName, optionValue)

Sets a value to the specified configuration option of the widget.

Parameters:
optionName: String

The name of the required option.

optionValue: any

The value to be assigned to the required option.

To set a value to the configuration option, specify the path to the field representing this option in the configuration object. For example, to set the tooltip | enabled option to true, pass the "tooltip.enabled" value as the optionName parameter and the "true" value as the optionValue parameter.

option(options)

Sets one or more widget options.

Parameters:
options: Object

An object containing required configuration options.

To set one or more widget options, pass the object that contains fields representing these options as the options parameter.

This method is useful if you need to configure several widget options at once.

render()

Redraws a widget.

In order to be displayed correctly when the size of the parent window or container is changed, a widget should be rerendered manually. To rerender the widget, call the render() method.

svg()

Returns the widget's SVG markup.

Return Value: String

The widget's SVG markup.

NOTE: This method does not support Internet Explorer 8.