Inheritance diagram for burst.webui.widgets.AbstractWidget:
These instances are managed by a burst.webui.WidgetManager instance.
The provided node might be used for an inline constructor, and it will be replaced. Or it might be a node that will be left as is, but some behavior will be attached. Thus there might be 3 different objects that a person might want to relate:
findByNode
. It is conceivable that there may be multiple widgets using the same Node, but the function just returns the first one.From a widget instance, it is possible to determine its input Node by the public variable inputNode.
The library maintains globally unique numerical ids of every widget instance. This can be obtained from an instance via the public variable widgetId. A widget instance from its widget id by findByWidgetId
A widget instance also holds a public readwrite String variable called appId. The library does not care what it is, or if it is even set. It is available for use by the client programmer. A widget can be recovered from a given appId using findByAppId
The id attribute of the input node, if any, is not used by us. Some widgets will remove their input node from the document, and id attributes are not copied over ito any replacement node(s).
Public Member Functions | |
AbstractWidget (Node node, Array propdefs, Boolean parse_properties) | |
constructor. | |
AbstractWidget | addChildWidget (AbstractWidget child_widget) |
Add the provided widget instance as a child of this widget instance parent. | |
void | parseProperties (Boolean do_defaults, Boolean do_mandatory) |
Initialize the widget instance from any "inline constructor" attributes as well as special immediate children. | |
Public Attributes | |
Node | inputNode |
The Node used in this widget instance's constructor. | |
Number | widgetId |
The generated globally unique id of this widget instance. | |
String | appId |
Any id associated with the instance by the client programmer. |
|
constructor. If parse_properties, call parseProperties(true, true). Otherwise, it calls burst.reflect.PropertyDef.setDefaultEach
|
|
Add the provided widget instance as a child of this widget instance parent. Returns the child. |
|
Initialize the widget instance from any "inline constructor" attributes as well as special immediate children. It uses the inputNode member variable (probably set by the constructor). It also uses the propdefs_ member variable (set to some constant array when the subclass calls the AbstractWidget super class constructor). There are a few different ways property values are found from a node:
|
|
Any id associated with the instance by the client programmer. readwrite and optional |
|
The Node used in this widget instance's constructor. readonly. |
|
The generated globally unique id of this widget instance. readonly. |