JavaScript API Reference
Class Index | File Index

## Classes

- wm
- wm.Box
- wm.Component
- wm.Container
- wm.DataGrid
- wm.DataGridColumn
- wm.Dijit
- wm.expression
- wm.LiveForm
- wm.LiveVariable
- wm.LiveView
- wm.MavericksModel
- wm.NavigationCall
- wm.NavigationService
- wm.Object
- wm.Panel
- wm.Service
- wm.ServiceVariable
- wm.Variable
- wm.Widget

# Class wm.Widget

Extends wm.Component.
Defined in: Widget.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| wm.Widget() 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.
| autoSize Automatically calculate appropriate size.
| disabled Disabled state.
| height Display height specified as a string with units.
| showing Showing state.
| width 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.
| disable() Set disabled property true.
| enable() 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)