Class RapidContext.Widget.ProgressBar

Extends: RapidContext.Widget

The progress bar widget class. Used to provide a dynamic progress meter, using a <div> HTML elements. The progress bar also provides a completion time estimation that is displayed in the bar. Whenever the range is modified, the time estimation is reset.

Source code: RapidContext_Widget_ProgressBar.js

Class Summary
 
Creates a new progress bar widget.
Method Summary
 
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
Methods borrowed from class RapidContext.Widget:
addAll, addChildNode, addClass, animate, blurAll, destroy, disable, enable, getChildNodes, hasClass, hide, isDisabled, isHidden, removeAll, removeChildNode, removeClass, setStyle, show, toggleClass, uid
Class Detail
RapidContext.Widget.ProgressBar(attrs)
Creates a new progress bar widget.
JavaScript:
var attrs = { text: "Working", noratio: true, notime: true };
var w = RapidContext.Widget.ProgressBar(attrs);
User Interface XML:
<ProgressBar text="Working" noratio="true" notime="true" />
Parameters:
{Object} attrs
the widget and node attributes
{Number} attrs.min Optional
the minimum range value, defaults to 0
{Number} attrs.max Optional
the maximum range value, defaults to 100
{Number} attrs.value Optional
the progress value, a number between min and max, defaults to 0
{Number} attrs.ratio Optional
the progress ratio, a floating-point number between 0.0 and 1.0, defaults to 0.0
{Number} attrs.text Optional
the additional information text, defaults to blank
{Boolean} attrs.noratio Optional
the hide ratio (in percent) display flag, defaults to false
{Boolean} attrs.novalue Optional
the hide value display flag, defaults to false
{Boolean} attrs.notime Optional
the hide remaining time display flag, defaults to false
{Boolean} attrs.hidden Optional
the hidden widget flag, defaults to false
Returns:
{Widget} the widget DOM node
Method Detail
setAttrs(attrs)
Updates the widget or HTML DOM node attributes. Note that updating the value will automatically also update the ratio. All calls to this method may trigger a new remaining time estimation.
Parameters:
{Object} attrs
the widget and node attributes to set
{Number} attrs.min Optional
the minimum range value, if modified the current value and ratio are reset
{Number} attrs.max Optional
the maximum range value, if modified the current value and ratio are reset
{Number} attrs.value Optional
the progress value, a number between min and max
{Number} attrs.ratio Optional
the progress ratio, a floating-point number between 0.0 and 1.0
{Number} attrs.text Optional
the additional information text
{Boolean} attrs.noratio Optional
the hide ratio (in percent) display flag
{Boolean} attrs.novalue Optional
the hide value display flag
{Boolean} attrs.notime Optional
the hide remaining time display flag
{Boolean} attrs.hidden Optional
the hidden widget flag