Class ProgressWidget

Description

This widget will display a progress bar without requiring a page turn to get the updated status from the web server.

  • author: Walter A. Boring IV

Located in /widgets/ProgressWidget.inc (line 20)

Container
   |
   --BaseWidget
      |
      --ProgressWidget
Variable Summary
Method Summary
ProgressWidget ProgressWidget ([integer $width = 300], [boolean $show_percent_flag = TRUE])
void render ([integer $indent_level = 1], [integer $output_debug = 0])
void set_color ([string $color = NULL])
void set_rendered_flag (boolean $flag)
none set_show_percent (boolean $flag)
void update (float $percent)
Variables
mixed $_percent = 0 (line 34)

The current value of the

percentage complete

mixed $_percent_pixels = 0 (line 40)

The current value of the

percentage complete in pixels

mixed $_rendered = FALSE (line 48)

Has the object been rendered yet? This usually means that is has been dumped to the browser.

mixed $_show_percent = TRUE (line 27)

Flag to tell us if they want to show the % text in the progress.

Inherited Variables

Inherited from BaseWidget

BaseWidget::$title
BaseWidget::$width
BaseWidget::$_image_prefix
Methods
Constructor ProgressWidget (line 57)

The Constructor

ProgressWidget ProgressWidget ([integer $width = 300], [boolean $show_percent_flag = TRUE])
  • integer $width: the width of the bar
  • boolean $show_percent_flag: show the percentage complete inside the bar?
render (line 106)

Render the main layout of the bar.

You have to call update periodically to get the bar to 'grow'

void render ([integer $indent_level = 1], [integer $output_debug = 0])
  • integer $indent_level: the indent level of the html output
  • integer $output_debug: the debug flag.

Redefinition of:
Container::render()
This function is compatible with the rest of the phpHtmllib API spec.
set_color (line 150)

This method is used to set the color of the progress bar itself

void set_color ([string $color = NULL])
  • string $color
set_rendered_flag (line 161)

set the rendered flag

void set_rendered_flag (boolean $flag)
  • boolean $flag
set_show_percent (line 69)

This sets the show percent text flag

none set_show_percent (boolean $flag)
  • boolean $flag: TRUE = show
update (line 77)

this function updates the progress bar

void update (float $percent)
  • float $percent: percentage

Inherited Methods

Inherited From BaseWidget

BaseWidget::get_align()
BaseWidget::get_css()
BaseWidget::get_javascript()
BaseWidget::get_title()
BaseWidget::get_width()
BaseWidget::set_align()
BaseWidget::set_image_path_prefix()
BaseWidget::set_title()
BaseWidget::set_width()

Inherited From Container

Container::Container()
Container::add()
Container::add_reference()
Container::count_content()
Container::get_element()
Container::get_indent_flag()
Container::push()
Container::push_reference()
Container::render()
Container::reset_content()
Container::set_collapse()
Container::set_indent_flag()

Documentation generated on Fri, 28 Jan 2011 08:53:12 -0500 by phpDocumentor 1.4.3