PhpExt : [ class tree ] [ index ] [ all elements ]

Class: PhpExt_ProgressBar

Source Location: /PhpExt/ProgressBar.php

Class PhpExt_ProgressBar

Class Overview

An updateable progress bar component. The progress bar supports two different modes: manual and automatic.

In manual mode, you are responsible for showing, updating (via updateProgress) and clearing the progress bar as needed from your own code. This method is most appropriate when you want to show progress throughout an operation that has predictable points of interest at which you can update the control.

In automatic mode, you simply call wait and let the progress bar run indefinitely, only clearing it once the operation is complete. You can optionally have the progress bar wait for a specific amount of time and then clear itself. Automatic mode is most appropriate for timed operations or asymchronous operations in which you have no need for indicating intermediate progress.

Located in /PhpExt/ProgressBar.php [line 28]

PhpExt_Object
   |
   --PhpExt_Observable
      |
      --PhpExt_Component
         |
         --PhpExt_BoxComponent
            |
            --PhpExt_ProgressBar
Author(s):
API Tags:
Abstract:  

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From PhpExt_Component

PhpExt_Component::$_layoutData
PhpExt_Component::$_ownerCollection
PhpExt_Component::$_plugins
PhpExt_Component::$_xType

Inherited From PhpExt_Observable

PhpExt_Observable::$_listeners

Inherited From PhpExt_Object

PhpExt_Object::$_extClassName
PhpExt_Object::$_extConfigProperties
PhpExt_Object::$_validExtConfigProperties
PhpExt_Object::$_varName

Inherited From PhpExt_BoxComponent

PhpExt_BoxComponent::__construct()
PhpExt_BoxComponent::getAutoHeight()
True to use height:'auto', false to use fixed height (defaults to false).
PhpExt_BoxComponent::getAutoWidth()
True to use width:'auto', false to use fixed width (defaults to false).
PhpExt_BoxComponent::getHeight()
The height of this component in pixels (defaults to auto).
PhpExt_BoxComponent::getWidth()
The width of this component in pixels (defaults to auto).
PhpExt_BoxComponent::setAutoHeight()
True to use height:'auto', false to use fixed height (defaults to false).
PhpExt_BoxComponent::setAutoWidth()
True to use width:'auto', false to use fixed width (defaults to false).
PhpExt_BoxComponent::setHeight()
The height of this component in pixels (defaults to auto).
PhpExt_BoxComponent::setWidth()
The width of this component in pixels (defaults to auto).

Inherited From PhpExt_Component

PhpExt_Component::__construct()
** Overrides ***
PhpExt_Component::getAllowDomMove()
Whether the component can move the Dom node when rendering (defaults to true).
PhpExt_Component::getApplyTo()
The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.
PhpExt_Component::getAutoShow()
True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false).
PhpExt_Component::getConfigParams()
PhpExt_Component::getContainerCssClass()
An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
PhpExt_Component::getCssClass()
An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules.
PhpExt_Component::getCssStyle()
A custom style specification to be applied to this component's Element.
PhpExt_Component::getDisabledCssClass()
CSS class added to the component when it is disabled (defaults to "x-item-disabled").
PhpExt_Component::getEl()
The DOM element to which this component show be rendered to. This should be used instead of renderTo or applyTo if using lazy render.
PhpExt_Component::getHideMode()
How this component should hidden. Supported values are
  1. PhpExt_Component::HIDE_MODE_VISIBILITY
(css visibility),
  1. PhpExt_Component::HIDE_MODE_OFFSETS
(negative offset position) and
  1. PhpExt_Component::HIDE_MODE_DISPLAY
(css display) - defaults to
  1. PhpExt_Component::HIDE_MODE_DISPLAY
.
PhpExt_Component::getHideParent()
True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container.
PhpExt_Component::getId()
The unique id of this component (defaults to an auto-assigned id).
PhpExt_Component::getLayoutData()
PhpExt_Component::getOwnerCollection()
PhpExt_Component::getPlugins()
An object or array of objects that will provide custom functionality for this component. The only requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. When a component is created, if any plugins are available, the component will call the init method on each plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide its functionality.
PhpExt_Component::getRenderTo()
The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.
PhpExt_Component::render()
** Ext Object Methods ***
PhpExt_Component::setAllowDomMove()
Whether the component can move the Dom node when rendering (defaults to true).
PhpExt_Component::setApplyTo()
The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container.
PhpExt_Component::setAutoShow()
True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false).
PhpExt_Component::setContainerCssClass()
An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
PhpExt_Component::setCssClass()
An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules.
PhpExt_Component::setCssStyle()
A custom style specification to be applied to this component's Element.
PhpExt_Component::setDisabledCssClass()
CSS class added to the component when it is disabled (defaults to "x-item-disabled").
PhpExt_Component::setEl()
The DOM element to which this component show be rendered to. This should be used instead of renderTo or applyTo if using lazy render.
PhpExt_Component::setExtClassInfo()
PhpExt_Component::setHideMode()
How this component should hidden. Supported values are
  1. PhpExt_Component::HIDE_MODE_VISIBILITY
(css visibility),
  1. PhpExt_Component::HIDE_MODE_OFFSETS
(negative offset position) and
  1. PhpExt_Component::HIDE_MODE_DISPLAY
(css display) - defaults to
  1. PhpExt_Component::HIDE_MODE_DISPLAY
.
PhpExt_Component::setHideParent()
True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container.
PhpExt_Component::setId()
The unique id of this component (defaults to an auto-assigned id).
PhpExt_Component::setLayoutData()
Layout specific properties for the corresponding layout of the container.
PhpExt_Component::setOwnerCollection()
PhpExt_Component::setRenderTo()
The id of the node, a DOM node or an existing Element that will be the container to render this component into. Using this config, a call to render() is not required.

Inherited From PhpExt_Observable

PhpExt_Observable::__construct()
PhpExt_Observable::attachListener()
Adds a PhpExt_Listener to the specified $eventName. This lintener will execute when the Javascript object fires that event.
PhpExt_Observable::getConfigParams()
PhpExt_Observable::getListeners()

Inherited From PhpExt_Object

PhpExt_Object::__construct()
PhpExt_Object::addValidConfigProperties()
PhpExt_Object::createMethodSignature()
PhpExt_Object::getConfigParams()
PhpExt_Object::getExtConfigProperty()
PhpExt_Object::getJavascript()
PhpExt_Object::getMethodInvokeStm()
PhpExt_Object::isExtObject()
PhpExt_Object::paramToString()
PhpExt_Object::setExtClassInfo()
PhpExt_Object::setExtConfigProperty()
PhpExt_Object::__get()
PhpExt_Object::__set()

Inherited From PhpExt_Component

PhpExt_Component::HIDE_MODE_DISPLAY
PhpExt_Component::HIDE_MODE_OFFSETS
PhpExt_Component::HIDE_MODE_VISIBILITY

[ Top ]
Method Summary
static PhpExt_JavascriptStm   reset()   Resets the progress bar value to 0 and text to empty string.
static PhpExt_JavascriptStm   wait()   Initiates an auto-updating progress bar. A duration can be specified, in which case the progress bar will automatically reset after a fixed amount of time and optionally call a callback function if specified.
PhpExt_ProgressBar   __construct()  
string   getBaseCssClass()   The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')
string   getId()   The progress bar element's id (defaults to an auto-generated id)
string   getText()   The progress bar text (defaults to '')
string|PhpExt_JavascriptStm   getTextEl()   The element to render the progress text to (defaults to the progress bar's internal text element)
float   getValue()   A floating point value between 0 and 1 (e.g., .5, defaults to 0)
PhpExt_ProgressBar   setBaseCssClass()   The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')
PhpExt_ProgressBar   setId()   The progress bar element's id (defaults to an auto-generated id)
PhpExt_ProgressBar   setText()   The progress bar text (defaults to '')
PhpExt_ProgressBar   setTextEl()   The element to render the progress text to (defaults to the progress bar's internal text element)
PhpExt_ProgressBar   setValue()   A floating point value between 0 and 1 (e.g., .5, defaults to 0)

[ Top ]
Methods
static method reset  [line 145]

  static PhpExt_JavascriptStm reset( [bool $hide = false]  )

Resets the progress bar value to 0 and text to empty string.

If hide = true, the progress bar will also be hidden (using the hideMode property internally).

Parameters:
bool   $hide:  (optional) True to hide the progress bar (defaults to false)

API Tags:
Access:  public


[ Top ]
static method wait  [line 161]

  static PhpExt_JavascriptStm wait( PhpExt_ProgressBarWaitConfigObject $config  )

Initiates an auto-updating progress bar. A duration can be specified, in which case the progress bar will automatically reset after a fixed amount of time and optionally call a callback function if specified.

If no duration is passed in, then the progress bar will run indefinitely and must be manually cleared by calling reset.

Parameters:
PhpExt_ProgressBarWaitConfigObject   $config:  (optional) A PhpExt_ProgressBarWaitConfigObject object

API Tags:
Access:  public


[ Top ]
Constructor __construct  [line 121]

  PhpExt_ProgressBar __construct( )


API Tags:
Access:  public


Redefinition of:
PhpExt_BoxComponent::__construct()

[ Top ]
getBaseCssClass  [line 44]

  string getBaseCssClass( )

The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')


API Tags:
Access:  public


[ Top ]
getId  [line 62]

  string getId( )

The progress bar element's id (defaults to an auto-generated id)


API Tags:
Access:  public


Redefinition of:
PhpExt_Component::getId()
The unique id of this component (defaults to an auto-assigned id).

[ Top ]
getText  [line 80]

  string getText( )

The progress bar text (defaults to '')


API Tags:
Access:  public


[ Top ]
getTextEl  [line 98]

  string|PhpExt_JavascriptStm getTextEl( )

The element to render the progress text to (defaults to the progress bar's internal text element)


API Tags:
Access:  public


[ Top ]
getValue  [line 116]

  float getValue( )

A floating point value between 0 and 1 (e.g., .5, defaults to 0)


API Tags:
Access:  public


[ Top ]
setBaseCssClass  [line 36]

  PhpExt_ProgressBar setBaseCssClass( string $value  )

The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setId  [line 54]

  PhpExt_ProgressBar setId( string $value  )

The progress bar element's id (defaults to an auto-generated id)

Parameters:
string   $value: 

API Tags:
Access:  public


Redefinition of:
PhpExt_Component::setId()
The unique id of this component (defaults to an auto-assigned id).

[ Top ]
setText  [line 72]

  PhpExt_ProgressBar setText( string $value  )

The progress bar text (defaults to '')

Parameters:
string   $value: 

API Tags:
Access:  public


[ Top ]
setTextEl  [line 90]

  PhpExt_ProgressBar setTextEl( string|PhpExt_JavascriptStm $value  )

The element to render the progress text to (defaults to the progress bar's internal text element)

Parameters:
string|PhpExt_JavascriptStm   $value: 

API Tags:
Access:  public


[ Top ]
setValue  [line 108]

  PhpExt_ProgressBar setValue( float $value  )

A floating point value between 0 and 1 (e.g., .5, defaults to 0)

Parameters:
float   $value: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 08 Aug 2008 15:58:03 -0500 by phpDocumentor 1.4.0