Note that the progress bar is updated via (a non-standard)
update() method, rather than via attr() like other widgets.
|
|
|
_applyAttributes(
) :
void
Step during widget creation to copy all widget attributes to the
DOM as per attributeMap and _setXXXAttr functions.
Skips over blank/false attribute values, unless they were explicitly specified
as parameters to the widget, since those are the default anyway,
and setting tabIndex="" is different than not setting tabIndex at all.
It processes the attributes in the attribute map first, and then
it goes through and processes the attributes for the _setXXXAttr
functions that have been specified
|
|
|
|
_attrToDom(
attr
: String
value
: String
) :
void
Reflect a widget attribute (title, tabIndex, duration etc.) to
the widget DOM, as specified in attributeMap.
Also sets this["attr"] to the new value.
Note some attributes like "type"
cannot be processed this way as they are not mutable.
Parameter |
Type |
Usage |
Description |
attr |
String |
required |
|
value |
String |
required |
|
|
|
|
|
_getAttrNames(
name
) :
void
Helper function for Widget.attr().
Caches attribute name values so we don't do the string ops every time.
Parameter |
Type |
Usage |
Description |
name |
|
required |
|
|
|
|
|
_getValueAttr(
) :
void
|
|
|
|
_onBlur(
) :
void
This is where widgets do processing for when they stop being active,
such as changing CSS classes. See onBlur() for more details.
|
|
|
|
_onConnect(
event
: String
) :
void
Called when someone connects to one of my handlers.
"Turn on" that handler if it isn't active yet.
This is also called for every single initialization parameter
so need to do nothing for parameters like "id".
Parameter |
Type |
Usage |
Description |
event |
String |
required |
|
|
|
|
|
_onFocus(
e
) :
void
This is where widgets do processing for when they are active,
such as changing CSS classes. See onFocus() for more details.
Parameter |
Type |
Usage |
Description |
e |
|
required |
|
|
|
|
|
_onShow(
) :
void
Internal method called when this widget is made visible.
See onShow for details.
|
|
|
|
_setClassAttr(
value
: String
) :
void
Custom setter for the CSS "class" attribute
Parameter |
Type |
Usage |
Description |
value |
String |
required |
|
|
|
|
|
_setStyleAttr(
value
: String||Object
) :
void
Sets the style attribut of the widget according to value,
Determines which node to set the style on based on style setting
in attributeMap.
Parameter |
Type |
Usage |
Description |
value |
String||Object |
required |
|
|
|
|
|
_setValueAttr(
v
) :
void
Parameter |
Type |
Usage |
Description |
v |
|
required |
|
|
|
|
|
attr(
name
: String|Object
value
: Object
) :
void
Set or get properties on a widget instance.
Get or set named properties on a widget. If no value is
provided, the current value of the attribute is returned,
potentially via a getter method. If a value is provided, then
the method acts as a setter, assigning the value to the name,
potentially calling any explicitly provided setters to handle
the operation. For instance, if the widget has properties "foo"
Parameter |
Type |
Usage |
Description |
name |
String|Object |
required |
The property to get or set. If an object is passed here and not
a string, its keys are used as names of attributes to be set
and the value of the object as values to set in the widget. |
value |
Object |
optional |
Optional. If provided, attr() operates as a setter. If omitted,
the current value of the named property is returned. |
|
|
|
|
buildRendering(
) :
void
Construct the UI for this widget, setting this.domNode
Most widgets will mixin `dijit._Templated`, which implements this
method.
|
|
|
|
connect(
obj
: Object|null
event
: String|Function
method
: String|Function
) :
void
Connects specified obj/event to specified method of this object
and registers for disconnect() on widget destroy.
Provide widget-specific analog to dojo.connect, except with the
implicit use of this widget as the target object.
This version of connect also provides a special "ondijitclick"
event which triggers on a click or space or enter keyup
Parameter |
Type |
Usage |
Description |
obj |
Object|null |
required |
|
event |
String|Function |
required |
|
method |
String|Function |
required |
|
Examples
|
|
|
|
create(
params
: Object
srcNodeRef
: DomNode|String
) :
void
Kick off the life-cycle of a widget
Create calls a number of widget methods (postMixInProperties, buildRendering, postCreate,
Parameter |
Type |
Usage |
Description |
params |
Object |
optional |
Hash of initialization parameters for widget, including
scalar values (like title, duration etc.) and functions,
typically callbacks like onClick. |
srcNodeRef |
DomNode|String |
optional |
|
|
|
|
|
destroy(
preserveDom
: Boolean
) :
void
Destroy this widget, but not its descendants.
This method will, however, destroy internal widgets such as those used within a template.
Parameter |
Type |
Usage |
Description |
preserveDom |
Boolean |
required |
If true, this method will leave the original DOM structure alone. |
|
|
|
|
destroyDescendants(
preserveDom
: Boolean
) :
void
Recursively destroy the children of this widget and their
descendants.
Parameter |
Type |
Usage |
Description |
preserveDom |
Boolean |
optional |
If true, the preserveDom attribute is passed to all descendant
widget's .destroy() method. Not for use with _Templated
widgets. |
|
|
|
|
destroyRecursive(
preserveDom
: Boolean
) :
void
Destroy this widget and its descendants
This is the generic "destructor" function that all widget users
should call to cleanly discard with a widget. Once a widget is
destroyed, it is removed from the manager object.
Parameter |
Type |
Usage |
Description |
preserveDom |
Boolean |
optional |
If true, this method will leave the original DOM structure |
|
|
|
|
destroyRendering(
preserveDom
: Boolean
) :
void
Destroys the DOM nodes associated with this widget
Parameter |
Type |
Usage |
Description |
preserveDom |
Boolean |
optional |
If true, this method will leave the original DOM structure alone |
|
|
|
|
disconnect(
handles
: _Widget.Handle
) :
void
Disconnects handle created by connect .
Also removes handle from this widget's list of connects.
Parameter |
Type |
Usage |
Description |
handles |
_Widget.Handle |
required |
|
|
|
|
|
getChildren(
) :
void
Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode.
Does not return nested widgets, nor widgets that are part of this widget's template.
|
|
|
|
getDescendants(
) :
void
Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode.
This method should generally be avoided as it returns widgets declared in templates, which are
supposed to be internal/hidden, but it's left here for back-compat reasons.
|
|
|
|
isFocusable(
) :
void
Return true if this widget can currently be focused
and false if not
|
|
|
|
isLeftToRight(
) :
void
Checks the page for text direction
|
|
|
|
onBlur(
) :
void
Called when the widget stops being "active" because
focus moved to something outside of it, or the user
clicked somewhere outside of it, or the widget was
hidden.
|
|
|
|
onChange(
) :
void
Callback fired when progress updates.
|
|
|
|
onClick(
event
: mouse
) :
void
Connect to this function to receive notifications of mouse click events.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onClose(
) :
void
Parameter for children of dijit.layout.StackContainer or subclasses.
Callback if a user tries to close the child. Child will be closed if this function returns true.
|
|
|
|
onDblClick(
event
: mouse
) :
void
Connect to this function to receive notifications of mouse double click events.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onFocus(
) :
void
Called when the widget becomes "active" because
it or a widget inside of it either has focus, or has recently
been clicked.
|
|
|
|
onHide(
) :
void
Called when another widget becomes the selected pane in a
dijit.layout.TabContainer , dijit.layout.StackContainer ,
dijit.layout.AccordionContainer , etc.
Also called to indicate hide of a dijit.Dialog , dijit.TooltipDialog , or dijit.TitlePane .
|
|
|
|
onKeyDown(
event
: key
) :
void
Connect to this function to receive notifications of keys being pressed down.
Parameter |
Type |
Usage |
Description |
event |
key |
required |
Event |
|
|
|
|
onKeyPress(
event
: key
) :
void
Connect to this function to receive notifications of printable keys being typed.
Parameter |
Type |
Usage |
Description |
event |
key |
required |
Event |
|
|
|
|
onKeyUp(
event
: key
) :
void
Connect to this function to receive notifications of keys being released.
Parameter |
Type |
Usage |
Description |
event |
key |
required |
Event |
|
|
|
|
onMouseDown(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse button is pressed down.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseEnter(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves onto this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseLeave(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves off of this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseMove(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseOut(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseOver(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseUp(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse button is released.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onShow(
) :
void
Called when this widget becomes the selected pane in a
dijit.layout.TabContainer , dijit.layout.StackContainer ,
dijit.layout.AccordionContainer , etc.
Also called to indicate display of a dijit.Dialog , dijit.TooltipDialog , or dijit.TitlePane .
|
|
|
|
placeAt(
reference
: String|DomNode|_Widget
position
: String|Int
) :
void
Place this widget's domNode reference somewhere in the DOM based
on standard dojo.place conventions, or passing a Widget reference that
contains and addChild member.
A convenience function provided in all _Widgets, providing a simple
shorthand mechanism to put an existing (or newly created) Widget
somewhere in the dom, and allow chaining.
Parameter |
Type |
Usage |
Description |
reference |
String|DomNode|_Widget |
required |
The String id of a domNode, a domNode reference, or a reference to a Widget posessing
an addChild method. |
position |
String|Int |
optional |
If passed a string or domNode reference, the position argument |
Examples
|
|
|
|
postCreate(
) :
void
Processing after the DOM fragment is created
Called after the DOM fragment has been created, but not necessarily
added to the document. Do not include any operations which rely on
node dimensions or placement.
|
|
|
|
postMixInProperties(
) :
void
Called after the parameters to the widget have been read-in,
but before the widget template is instantiated. Especially
useful to set properties that are referenced in the widget
template.
|
|
|
|
postscript(
params
: Object
srcNodeRef
: DomNode|String
) :
void
Kicks off widget instantiation. See create() for details.
Parameter |
Type |
Usage |
Description |
params |
Object |
optional |
|
srcNodeRef |
DomNode|String |
required |
|
|
|
|
|
report(
percent
: float
) :
void
Generates message to show inside progress bar (normally indicating amount of task completed).
May be overridden.
Parameter |
Type |
Usage |
Description |
percent |
float |
required |
|
|
|
|
|
setAttribute(
attr
: String
value
: anything
) :
void
Deprecated. Use attr() instead.
Parameter |
Type |
Usage |
Description |
attr |
String |
required |
|
value |
anything |
required |
|
|
|
|
|
startup(
) :
void
Processing after the DOM fragment is added to the document
Called after a widget and its children have been created and added to the page,
and all related widgets have finished their create() cycle, up through postCreate().
This is useful for composite widgets that need to control or layout sub-widgets.
Many layout widgets can use this as a wiring phase.
|
|
|
|
subscribe(
topic
: String
method
: String|Function
) :
void
Subscribes to the specified topic and calls the specified method
of this object and registers for unsubscribe() on widget destroy.
Provide widget-specific analog to dojo.subscribe, except with the
implicit use of this widget as the target object.
Parameter |
Type |
Usage |
Description |
topic |
String |
required |
|
method |
String|Function |
required |
|
Examples
|
|
|
|
toString(
) :
void
Returns a string that represents the widget
When a widget is cast to a string, this method will be used to generate the
output. Currently, it does not implement any sort of reversible
serialization.
|
|
|
|
uninitialize(
) :
void
Stub function. Override to implement custom widget tear-down
behavior.
|
|
|
|
unsubscribe(
handle
: Object
) :
void
Unsubscribes handle created by this.subscribe.
Also removes handle from this widget's list of subscriptions
Parameter |
Type |
Usage |
Description |
handle |
Object |
required |
|
|
|
|
|
update(
attributes
: Object
) :
void
Change attributes of ProgressBar, similar to attr(hash).
Parameter |
Type |
Usage |
Description |
attributes |
Object |
optional |
May provide progress and/or maximum properties on this parameter;
see attribute specs for details. |
Examples
|
|
|
|
_attrPairNames : shared
Initial value{}
Detailsbetween all widgets
|
|
|
|
_beingDestroyed : Object
|
|
|
|
_blankGif : String
DetailsPath to a blank 1x1 image.
Used by <img> nodes in templates that really get their image via CSS background-image.
|
|
|
|
_connects : Array
|
|
|
|
_created : Object
|
|
|
|
_deferredConnects : Object
Initial value{onClick : "", onDblClick : "", onKeyDown : "", onKeyPress : "", onKeyUp : "", onMouseMove : "", onMouseDown : "", onMouseOut : "", onMouseOver : "", onMouseLeave : "", onMouseEnter : "", onMouseUp : "", }
DetailsattributeMap addendum for event handlers that should be connected only on first use
|
|
|
|
_destroyed : Object
|
|
|
|
_indeterminateHighContrastImagePath : dojo._URL
Initial valuedojo.moduleUrl(("dijit", "themes/a11y/indeterminate_progress.gif"))
DetailsURL to image to use for indeterminate progress bar when display is in high contrast mode
|
|
|
|
_started : Boolean
Detailsstartup() has completed.
|
|
|
|
_subscribes : Array
|
|
|
|
attributeMap : Object
Initial value{id : "", dir : "", lang : "", class : "", style : "", title : "", }
DetailsattributeMap sets up a "binding" between attributes (aka properties)
of the widget and the widget's DOM.
Changes to widget attributes listed in attributeMap will be
reflected into the DOM.
For example, calling attr('title', 'hello')
on a TitlePane will automatically cause the TitlePane's DOM to update
with the new title.
attributeMap is a hash where the key is an attribute of the widget,
|
|
|
|
class : String
DetailsHTML class attribute
|
|
|
|
closable : Boolean
DetailsParameter for children of dijit.layout.StackContainer or subclasses.
True if user can close (destroy) this child, such as (for example) clicking the X on the tab.
|
|
|
|
containerNode : DomNode
Initial valuenull
DetailsDesignates where children of the source DOM node will be placed.
"Children" in this case refers to both DOM nodes and widgets.
|
|
|
|
dir : String
DetailsUnsupported by Dijit, but here for completeness. Dijit only supports setting text direction on the
entire document.
|
|
|
|
dojoAttachEvent : String
|
|
|
|
dojoAttachPoint : String
|
|
|
|
domNode : DomNode
Initial valuenull
DetailsThis is our visible representation of the widget! Other DOM
Nodes may by assigned to other properties, usually through the
template system's dojoAttachPoint syntax, but the domNode
property is the canonical "top level" node in widget UI.
|
|
|
|
iconClass : String
DetailsParameter for children of dijit.layout.StackContainer or subclasses.
CSS Class specifying icon to use in label associated with this pane.
|
|
|
|
id : String
DetailsA unique, opaque ID string that can be assigned by users or by the
system. If the developer passes an ID which is known not to be
unique, the specified ID is ignored and the system-generated ID is
used instead.
|
|
|
|
indeterminate : Boolean
|
|
|
|
lang : String
DetailsRarely used. Overrides the default Dojo locale used to render this widget,
|
|
|
|
layoutAlign : String
Details"none", "left", "right", "bottom", "top", and "client".
See the LayoutContainer description for details on this parameter.
|
|
|
|
maximum : Float
Initial value100
DetailsMax sample number
|
|
|
|
maxSize : Number
DetailsParameter for children of dijit.layout.BorderContainer .
Specifies a maximum size (in pixels) for this widget when resized by a splitter.
|
|
|
|
minSize : Number
DetailsParameter for children of dijit.layout.BorderContainer .
Specifies a minimum size (in pixels) for this widget when resized by a splitter.
|
|
|
|
name : String
Detailsthis is the field name (for a form) if set. This needs to be set if you want to use
this widget in a dijit.form.Form widget (such as dijit.Dialog)
|
|
|
|
nodesWithKeyClick : String[]
Initial value["input", "button"]
DetailsList of nodes that correctly handle click events via native browser support,
and don't need dijit's help
|
|
|
|
params :
|
|
|
|
places : Number
DetailsNumber of places to show in values; 0 by default
|
|
|
|
progress : String
Details(Percentage or Number)
Number or percentage indicating amount of task completed.
|
|
|
|
region : String
DetailsParameter for children of dijit.layout.BorderContainer .
|
|
|
|
selected : Boolean
DetailsParameter for children of dijit.layout.StackContainer or subclasses.
Specifies that this widget should be the initially displayed pane.
|
|
|
|
showTitle : Boolean
DetailsParameter for children of dijit.layout.StackContainer or subclasses.
When true, display title of this widget as tab label etc., rather than just using
icon specified in iconClass
|
|
|
|
sizeMin : Integer
DetailsDeprecated. Parameter for children of dijit.layout.SplitContainer .
Minimum size (width or height) of a child of a SplitContainer.
The value is relative to other children's sizeShare properties.
|
|
|
|
sizeShare : Integer
DetailsDeprecated. Parameter for children of dijit.layout.SplitContainer .
Size (width or height) of a child of a SplitContainer.
The value is relative to other children's sizeShare properties.
For example, if there are two children and each has sizeShare=10, then
each takes up 50% of the available space.
|
|
|
|
splitter : Boolean
DetailsParameter for child of dijit.layout.BorderContainer where region != "center".
If true, enables user to resize the widget by putting a draggable splitter between
this widget and the region=center widget.
|
|
|
|
srcNodeRef : DomNode
Initial valuenull
Detailspointer to original DOM node
|
|
|
|
style : String||Object
DetailsHTML style attributes as cssText string or name/value hash
|
|
|
|
templateString : Object
Initial valuedojo.cache(("dijit", "templates/ProgressBar.html"))
|
|
|
|
title : String
DetailsHTML title attribute.
For form widgets this specifies a tooltip to display when hovering over
the widget (just like the native HTML title attribute).
For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer,
etc., it's used to specify the tab label, accordion pane title, etc.
|
|
|
|
tooltip : String
|
|
|
|
waiRole : String
|
|
|
|
waiState : String
|