Home Reference Source
import DataItem from './gui/data-items/DataItem.jsx'
public class | source

DataItem

The purpose of DataItem is to give a uniform way to listen to property changes. Any class that extends DataItem will have the ability to register a property listener that gets called whenever that property changes. DataItem also gives you the ability to manipulate certain properties like disabled, hidden, and suppressed.

Member Summary

Public Members
public

Function that returns the dataName of the data item.

public

Function that returns whether or not any UI element bound to this data item will be disabled for edit; effectively read only.

public

Function that returns whether or not this data item will persist its data value in the tool's XML configuration during the GetConfiguration phase.

public

registerPropertyListener(propertName: string, handler: function): string: *

Function that will let you register listeners for changes to various properties on the data item.

public

setDisabled(val: boolean): *

Function that changes whether or not any UI element bound to this data item will be disabled for edit; effectively read only.

public

setHidden(val: boolean): *

Function that allows you to change the visibility of any UI element bound to this data item.

public

Function that changed whether or not this data item will persist its data value in the tool's XML configuration during the GetConfiguration phase.

public

Function that will take an identifier from a property listener registration, and remove the given listener.

Public Members

public getDataName: string: * source

Function that returns the dataName of the data item.

Return:

string

The data name of the given data item. The data name is the XML element tag that this data will be persisted in the tool configuration as.

public getDisabled: boolean: * source

Function that returns whether or not any UI element bound to this data item will be disabled for edit; effectively read only.

Return:

boolean

public getSuppressed: boolean: * source

Function that returns whether or not this data item will persist its data value in the tool's XML configuration during the GetConfiguration phase.

Return:

boolean

public registerPropertyListener(propertName: string, handler: function): string: * source

Function that will let you register listeners for changes to various properties on the data item. The first parameter may be the property name, and is optional. If you give the event listener function as the first and only parameter, it will be executed for all property change events.

Return:

string

The unique id for this listener. You can use this with unregisterPropertyListener to unregister the listener.

public setDisabled(val: boolean): * source

Function that changes whether or not any UI element bound to this data item will be disabled for edit; effectively read only.

public setHidden(val: boolean): * source

Function that allows you to change the visibility of any UI element bound to this data item.

public setSuppressed(val: boolean): * source

Function that changed whether or not this data item will persist its data value in the tool's XML configuration during the GetConfiguration phase.

public unregisterPropertyListener(registerId: string): * source

Function that will take an identifier from a property listener registration, and remove the given listener. This will halt that listener from firing on any more property change events for this data item.