Class Index | File Index

Classes

Class ox.UI.Widget

Abstract base class of all widgets.
Defined in: configuration.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
The default value of this widget, which is used when the model does not contain the field for this widget.
 
Specifies whether the widget is enabled.
 
A DOM node which is used by the default implementation of #enable and #disable to control the disabled state of the widget.
 
Specifies whether the widget was already initialized.
 
The actual enabled state of the widget, which can be false even if enabled is set to true, because the widget's container is disabled.
 
The actual visibility of the widget, which can be false even if visible is set to true, because the widget's container is invisible.
 
The topmost DOM node of the widget.
 
The widget which contains this widget.
 
Specifies whether the widget is visible.
 
The width of the widget as a CSS length specification.
Method Summary
Method Attributes Method Name and Description
 
addContent(node_id)
Adds the DOM nodes of this widget to its parent container.
 
Applies the value of this.isEnabled to the actual widget.
 
Applies the visibility status to the actual widget.
 
Disables the widget for user interaction.
 
Enables the widget for user interaction.
 
get()
Returns the current value of the widget.
 
hide()
Hides the widget.
 
Removes the widget's DOM nodes from the form.
 
Resizes the widget.
 
set(value)
Sets the value which is displayed by the widget.
 
setEnabled(enabled)
Enables or disables the widget.
 
setParent(parent)
Sets the widget's container.
 
setVisible(visible)
Sets the visibility of the widget.
 
show()
Displays the widget if it was previously hidden.
Class Detail
ox.UI.Widget()
Field Detail
default_value
The default value of this widget, which is used when the model does not contain the field for this widget.

{Boolean} enabled
Specifies whether the widget is enabled.
Default Value:
true

{DOM Node} formnode
A DOM node which is used by the default implementation of #enable and #disable to control the disabled state of the widget. The DOM node should have a property named "disabled". If the value equals false, disabling will have no effect besides updating the #enabled field and applying the disabled CSS.

{Boolean} initialized
Specifies whether the widget was already initialized.
Default Value:
false

isEnabled
The actual enabled state of the widget, which can be false even if enabled is set to true, because the widget's container is disabled.

isVisible
The actual visibility of the widget, which can be false even if visible is set to true, because the widget's container is invisible.

{DOM Node} node
The topmost DOM node of the widget. It is used by the default implementations of #show, #hide and #remove.

parent
The widget which contains this widget. null if this widget is not a child of another widget.
Default Value:
null

{Boolean} visible
Specifies whether the widget is visible.
Default Value:
true

{String} width
The width of the widget as a CSS length specification. If not specified, defaults to the ox.UI.Container#childWidth of the parent.
Method Detail
addContent(node_id)
Adds the DOM nodes of this widget to its parent container.
Parameters:
{String} node_id
The ID of the current page. This ID is required for adding menu entries.

applyEnabled()
Applies the value of this.isEnabled to the actual widget. When this method is called, the widget is already initialized.

applyVisible()
Applies the visibility status to the actual widget. Only called when the widget is initialized.

disable()
Disables the widget for user interaction.

enable()
Enables the widget for user interaction.

get()
Returns the current value of the widget. The returned type depends on the actual widget class.

hide()
Hides the widget.

remove()
Removes the widget's DOM nodes from the form.

resize()
Resizes the widget.

set(value)
Sets the value which is displayed by the widget.
Parameters:
value
The new value of the widget. The type depends on the actual widget class.

setEnabled(enabled)
Enables or disables the widget.
Parameters:
{Boolean} enabled
The new enabled status.

setParent(parent)
Sets the widget's container.
Parameters:
{ox.UI.Container} parent
The new parent container.

setVisible(visible)
Sets the visibility of the widget.
Parameters:
{Boolean} visible
The new visibility status.

show()
Displays the widget if it was previously hidden.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Jan 30 2012 16:58:00 GMT+0100 (CET)