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

Class: HTML_Progress_UI

Source Location: /Progress/UI.php

Class Overview

HTML_Common
   |
   --HTML_Progress_UI

HTML loading bar with only PHP and JS interface.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 The PHP Group

Methods


Child classes:

HTML_Progress_Model
The HTML_Progress_Model class provides an easy way to set look and feel of a progress bar with external config file.

Inherited Variables

Inherited Methods


Class Details

[line 43]
HTML loading bar with only PHP and JS interface.

The HTML_Progress_UI class provides a basic look and feel implementation of a progress bar.




Tags:

link:  http://pear.php.net/package/HTML_Progress2
since:  Class available since Release 1.0
version:  Release: @package_version@
license:  PHP License 3.0
copyright:  1997-2005 The PHP Group
author:  Laurent Laville <mailto:pear@laurent-laville.org>


[ Top ]


Class Methods


constructor HTML_Progress_UI [line 209]

HTML_Progress_UI HTML_Progress_UI( int $cell)

The progress bar's UI model class constructor

Constructor Summary

  • Creates a natural horizontal progress bar that displays ten cells/units.

    1 $html = new HTML_Progress_UI();
  • Creates a natural horizontal progress bar with the specified cell count, which cannot be less than 1 (minimum), but has no maximum limit.

    1 $html = new HTML_Progress_UI($cell);




Tags:

throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

int   $cell   (optional) Cell count

[ Top ]

method drawCircleSegments [line 1059]

array drawCircleSegments( [string $dir = '.'], [string $fileMask = 'c%s.png'])

Draw all circle segment pictures



Tags:

throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.2.0RC1


Parameters:

string   $dir   (optional) Directory where pictures should be created
string   $fileMask   (optional) sprintf format for pictures filename

[ Top ]

method getBorderAttributes [line 670]

mixed getBorderAttributes( [bool $asString = false])

Returns the progress bar's border attributes. Assoc array (defaut) or string.



Tags:

see:  HTML_Progress_UI::setBorderAttributes()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

bool   $asString   (optional) whether to return the attributes as string

[ Top ]

method getCellAttributes [line 460]

mixed getCellAttributes( [bool $asString = false])

Returns the common and private cell attributes. Assoc array (defaut) or string



Tags:

see:  HTML_Progress_UI::setCellAttributes()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

bool   $asString   (optional) whether to return the attributes as string

[ Top ]

method getCellCoordinates [line 566]

array getCellCoordinates( )

Returns the coordinates of each cell for a polygonal progress shape.



Tags:

return:  list of cell coordinates
see:  HTML_Progress_UI::setCellCoordinates()
access:  public
since:  1.2.0


[ Top ]

method getCellCount [line 412]

integer getCellCount( )

Returns the number of cell in the progress bar. The default value is 10.



Tags:

see:  HTML_Progress_UI::setCellCount()
access:  public
since:  1.0


[ Top ]

method getFillWay [line 368]

string getFillWay( )

Returns 'natural' or 'reverse', depending of the fill way of progress bar.

For horizontal progress bar, natural way is from left to right, and reverse way is from right to left. For vertical progress bar, natural way is from down to up, and reverse way is from up to down. The default fill way is 'natural'.




Tags:

see:  HTML_Progress_UI::setFillWay()
access:  public
since:  1.0


[ Top ]

method getOrientation [line 299]

integer getOrientation( )

Returns HTML_PROGRESS_BAR_HORIZONTAL or HTML_PROGRESS_BAR_VERTICAL, depending on the orientation of the progress bar.

The default orientation is HTML_PROGRESS_BAR_HORIZONTAL.




Tags:

see:  HTML_Progress_UI::setOrientation()
access:  public
since:  1.0


[ Top ]

method getProgressAttributes [line 789]

mixed getProgressAttributes( [bool $asString = false])

Returns the progress attributes. Assoc array (defaut) or string.



Tags:

see:  HTML_Progress_UI::setProgressAttributes()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

bool   $asString   (optional) whether to return the attributes as string

[ Top ]

method getScript [line 852]

string getScript( )

Get the javascript code to manage progress bar.



Tags:

return:  JavaScript URL or inline code to manage progress bar
author:  Christian Wenz <mailto:wenz@php.net> Helper. See details on thanks section of README file.
author:  Stefan Neufeind <mailto:pear.neufeind@speedpartner.de> Contributor. See details on thanks section of README file.
see:  HTML_Progress_UI::setScript()
access:  public
since:  0.5


[ Top ]

method getStringAttributes [line 725]

mixed getStringAttributes( [bool $asString = false])

Returns the string attributes. Assoc array (defaut) or string.



Tags:

see:  HTML_Progress_UI::setStringAttributes()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

bool   $asString   (optional) whether to return the attributes as string

[ Top ]

method getStyle [line 974]

string getStyle( )

Get the cascading style sheet to put inline on HTML document



Tags:

author:  Stefan Neufeind <mailto:pear.neufeind@speedpartner.de> Contributor. See details on thanks section of README file.
access:  public
since:  0.2


[ Top ]

method setBorderAttributes [line 707]

void setBorderAttributes( mixed $attributes)

Sets the progress bar's border attributes.

Defaults are:

  • class = progressBarBorder
  • width = 0
  • style = solid
  • color = #000000




Tags:



Parameters:

mixed   $attributes   Associative array or string of HTML tag attributes

[ Top ]

method setCellAttributes [line 517]

void setCellAttributes( mixed $attributes, [int $cell = null])

Sets the cell attributes for an existing cell.

Defaults are:

  • Common :
    • id = progressCell%01s
    • class = cell
    • spacing = 2
    • active-color = #006600
    • inactive-color = #CCCCCC
    • font-family = Courier, Verdana
    • font-size = lowest value from cell width, cell height, and font size
    • color = #000000
    • background-color = #FFFFFF (added for progress circle shape on release 1.2.0)
    • Horizontal Bar :
      • width = 15
      • height = 20
    • Vertical Bar :
      • width = 20
      • height = 15




Tags:

see:  HTML_Progress_UI::getCellAttributes(), HTML_Progress_UI::getCellCount()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

mixed   $attributes   Associative array or string of HTML tag attributes
int   $cell   (optional) Cell index

[ Top ]

method setCellCoordinates [line 583]

void setCellCoordinates( integer $xgrid, integer $ygrid, [array $coord = array()])

Set the coordinates of each cell for a polygonal progress shape.



Tags:

see:  HTML_Progress_UI::getCellCoordinates()
access:  public
since:  1.2.0


Parameters:

integer   $xgrid   The grid width in cell size
integer   $ygrid   The grid height in cell size
array   $coord   (optional) Coordinates (x,y) in the grid, of each cell

[ Top ]

method setCellCount [line 428]

void setCellCount( integer $cells)

Sets the number of cell in the progress bar



Tags:

see:  HTML_Progress_UI::getCellCount()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

integer   $cells   Cell count on progress bar

[ Top ]

method setFillWay [line 385]

void setFillWay( string $way)

Sets the progress bar's fill way, which must be 'natural' or 'reverse'.

The default fill way is 'natural'.




Tags:

see:  HTML_Progress_UI::getFillWay()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

string   $way   fill direction (natural or reverse)

[ Top ]

method setOrientation [line 317]

void setOrientation( integer $orient)

Sets the progress bar's orientation, which must be HTML_PROGRESS_BAR_HORIZONTAL or HTML_PROGRESS_BAR_VERTICAL.

The default orientation is HTML_PROGRESS_BAR_HORIZONTAL.




Tags:

see:  HTML_Progress_UI::getOrientation()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

integer   $orient   Orientation (horizontal or vertical)

[ Top ]

method setProgressAttributes [line 835]

void setProgressAttributes( mixed $attributes)

Sets the common progress bar attributes.

Defaults are:

  • class = progressBar
  • background-color = #FFFFFF
  • auto-size = true
  • Horizontal Bar :
    • width = (cell_count * (cell_width + cell_spacing)) + cell_spacing
    • height = cell_height + (2 * cell_spacing)
  • Vertical Bar :
    • width = cell_width + (2 * cell_spacing)
    • height = (cell_count * (cell_height + cell_spacing)) + cell_spacing




Tags:

see:  HTML_Progress_UI::getProgressAttributes()
access:  public
since:  1.0


Parameters:

mixed   $attributes   Associative array or string of HTML tag attributes

[ Top ]

method setScript [line 938]

void setScript( string $url)

Set the external JavaScript code (file) to manage progress element.



Tags:

see:  HTML_Progress_UI::getScript()
throws:  HTML_PROGRESS_ERROR_INVALID_INPUT
access:  public
since:  1.0


Parameters:

string   $url   URL to the linked Progress JavaScript

[ Top ]

method setStringAttributes [line 773]

void setStringAttributes( mixed $attributes)

Sets the string attributes.

Defaults are:

  • id = installationProgress
  • width = 50
  • font-family = Verdana, Arial, Helvetica, sans-serif
  • font-size = 12
  • color = #000000
  • background-color = #FFFFFF
  • align = right
  • Horizontal Bar :
    • valign = right
  • Vertical Bar :
    • valign = bottom




Tags:



Parameters:

mixed   $attributes   Associative array or string of HTML tag attributes

[ Top ]


Documentation generated on Sun, 25 Sep 2005 17:25:47 +0200 by phpDocumentor 1.2.3