RapidContext
Access > Discovery > Insight
www.rapidcontext.com
The base class for the HTML user interface widgets.
The Widget class shouldn't be instantiated directly, instead
one of the subclasses should be instantiated.
Source code:
RapidContext_Widget.js
<static> |
RapidContext.Widget.Classes
The global widget registry.
|
addAll()
Adds one or more children to this widget.
|
|
addChildNode(child)
Adds a single child DOM node to this widget.
|
|
addClass()
Adds the specified CSS class names to this HTML DOM node.
|
|
animate(opts)
Performs a visual effect animation on this widget.
|
|
blurAll()
Blurs (unfocuses) this DOM node and all relevant child nodes.
|
|
<static> |
RapidContext.Widget.createWidget(name, attrs)
Creates a new widget with the specified name, attributes and
child widgets or DOM nodes.
|
destroy()
The internal widget destructor function.
|
|
<static> |
RapidContext.Widget.destroyWidget(node)
Destroys a widget or a DOM node.
|
disable()
Disables this widget if it was previously enabled.
|
|
<static> |
RapidContext.Widget.emitSignal(node, sig)
Emits an asynchronous signal to any listeners connected with
MochiKit.Signal.
|
enable()
Enables this widget if it was previously disabled.
|
|
Returns an array with all child DOM nodes.
|
|
hasClass()
Checks if this HTML DOM node has the specified CSS class names.
|
|
hide()
Hides this widget node if it was previously visible.
|
|
Checks if this widget is disabled.
|
|
<static> |
RapidContext.Widget.isFormField(obj)
Checks if the specified object is a form field.
|
isHidden()
Checks if this widget node is hidden.
|
|
<static> |
RapidContext.Widget.isWidget(obj, className)
Checks if the specified object is a widget.
|
Removes all children to this widget.
|
|
removeChildNode(child)
Removes a single child DOM node from this widget.
|
|
Removes the specified CSS class names from this HTML DOM node.
|
|
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
|
|
setStyle(styles)
Updates the CSS styles of this HTML DOM node.
|
|
show()
Shows this widget node if it was previously hidden.
|
|
Toggles adding and removing the specified CSS class names to and
from this HTML DOM node.
|
|
uid()
Returns the unique identifier for this DOM node.
|
widgetwill cause this function to return true. Otherwise, false will be returned. As an option, this function can also check if the widget has a certain class by checking for an additional CSS class
widget<className>(which is a standard followed by all widgets).
valueproperty will cause this function to return true. Otherwise, false will be returned.
onclickor similar)
thisas the first argument.
widget.setStyle({ "font-size": "bold", "color": "red" });
widget.
widgetDisabledCSS class and the disabled property. Changes to the disabled status can be made with enable(), disable() or setAttrs().
widget.animate({ effect: "fade", duration: 0.5 }); widget.animate({ effect: "Move", transition: "spring", y: 300 });
replaceand a unique scope for each widget (see MochiKit.Visual for full options)