Class Index | File Index

Classes


Class wm.Widget


Extends wm.Component.

Defined in: Widget.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Base class for all visual components.
Property Summary
Property Attributes Property Name and Description
Note: to support bindings it is recommend that you use the getValue/setValue API to access or modify properties.
 
Automatically calculate appropriate size.
 
Disabled state.
 
Display height specified as a string with units.
 
Showing state.
 
Display width specified as a string with units.
Fields borrowed from class wm.Component:
name, owner

Method Summary
Method Attributes Method Name and Description
 
addUserClass(inClass, inNodeName)
Add CSS class to a widget node.
 
Set disabled property true.
 
Set disabled property false.
 
hide()
Set showing property false.
 
removeUserClass(inClass, inNodeName)
Remove a CSS class from a widget node.
 
setDisabled(inDisabled)
Set disabled property for this widget.
 
show()
Set showing property true.
Methods borrowed from class wm.Component:
constructor, createComponent, destroy, getId, getRuntimeId

Methods borrowed from class wm.Object:
extendSchema, getPropertyType, getPropFlags, getValue, listDataProperties, listProperties, setValue, toString

Class Detail
wm.Widget()
Base class for all visual components.
Report errata or suggestions for Widget.
Property Detail
Note: to support bindings it is recommend that you use the getValue/setValue API to access or modify properties.
{Boolean} autoSize
Automatically calculate appropriate size. Not supported in all Widgets.
Example:
this.button.setValue("autoSize", true);
Report errata or suggestions for autoSize.

{Boolean} disabled
Disabled state.

Some widgets change behavior or display based on the disabled state.
See:
disable, enable.
Example:
this.button.setValue("disabled", true);
this.panel.disable();
this.label.enable();
Report errata or suggestions for disabled.

{String} height
Display height specified as a string with units.

Supports CSS units and flex units.
Example:
this.button.setValue("height", "96px");
this.text.setValue("height", "4em");
this.box.setValue("height", "1flex");
Report errata or suggestions for height.

{Boolean} showing
Showing state.

Whether the widget if shown on the display.
See:
hide, show.
Example:
this.button.setValue("showing", false);
this.panel.show();
this.label.hide();
Report errata or suggestions for showing.

{String} width
Display width specified as a string with units.

Supports CSS units and flex units.
Example:
this.button.setValue("width", "96px");
this.text.setValue("width", "4em");
this.box.setValue("width", "1flex");
Report errata or suggestions for width.
Method Detail
addUserClass(inClass, inNodeName)
Add CSS class to a widget node.
Parameters:
{String} inClass
The class to add.
{String} inNodeName
(Optional) a property in this widget that references a node. If ommitted, the default node is used.
Example:
this.panel.addUserClass("hilite-border");
Report errata or suggestions for addUserClass.

disable()
Set disabled property true.
Report errata or suggestions for disable.

enable()
Set disabled property false.
Report errata or suggestions for enable.

hide()
Set showing property false.
Report errata or suggestions for hide.

removeUserClass(inClass, inNodeName)
Remove a CSS class from a widget node.
Parameters:
{String} inClass
The class to remove.
{String} inNodeName
(Optional) a property in this widget that references a node. If ommitted, the default node is used.
Example:
this.panel.removeUserClass("hilite-border");
Report errata or suggestions for removeUserClass.

setDisabled(inDisabled)
Set disabled property for this widget.

Some widgets change behavior or display based on the disabled state.
Parameters:
{Boolean} inDisabled
True to set disabled.
Report errata or suggestions for setDisabled.

show()
Set showing property true.
Report errata or suggestions for show.

Documentation generated by JsDoc Toolkit 2.0.1 on Mon Aug 25 2008 17:29:16 GMT-0700 (PDT)