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



Methods



Class Details

[line 35]


[ Top ]


Class Methods


constructor HTML_Progress_UI [line 201]

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 671]

mixed getBorderAttributes( [bool $asString = false])

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



Tags:

tutorial:  HTML_Progress_UI::getBorderAttributes
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 459]

mixed getCellAttributes( [bool $asString = false])

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



Tags:

tutorial:  HTML_Progress_UI::getCellAttributes
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 409]

integer getCellCount( )

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



Tags:

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


[ Top ]

method getFillWay [line 363]

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:

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


[ Top ]

method getOrientation [line 292]

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:

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


[ Top ]

method getProgressAttributes [line 794]

mixed getProgressAttributes( [bool $asString = false])

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



Tags:

tutorial:  HTML_Progress_UI::getProgressAttributes
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 859]

string getScript( )

Get the javascript code to manage progress bar.



Tags:

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


[ Top ]

method getStringAttributes [line 728]

mixed getStringAttributes( [bool $asString = false])

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



Tags:

tutorial:  HTML_Progress_UI::getStringAttributes
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 981]

object HTML_CSS &getStyle( )

Get the cascading style sheet to put inline on HTML document



Tags:

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


[ Top ]

method setBorderAttributes [line 709]

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:

tutorial:  HTML_Progress_UI::setCellAttributes
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 426]

void setCellCount( integer $cells)

Sets the number of cell in the progress bar



Tags:

tutorial:  HTML_Progress_UI::setCellCount
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 381]

void setFillWay( string $way)

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

The default fill way is 'natural'.




Tags:

tutorial:  HTML_Progress_UI::setFillWay
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 311]

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:

tutorial:  HTML_Progress_UI::setOrientation
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 841]

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:

tutorial:  HTML_Progress_UI::setProgressAttributes
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 944]

void setScript( string $url)

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



Tags:

tutorial:  HTML_Progress_UI::setScript
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 777]

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, 12 Sep 2004 20:23:45 +0200 by phpDocumentor 1.3.0RC3