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

Class: HTML_Progress_UI

Source Location: /HTML_Progress-1.2.6/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.



[ Top ]


Method Detail

HTML_Progress_UI (Constructor)   [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);

  • Since: 1.0
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Access: public

Parameters:

int   $cell   —  (optional) Cell count

[ Top ]

drawCircleSegments   [line 1061]

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

Draw all circle segment pictures
  • Since: 1.2.0RC1
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Access: public

Parameters:

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

[ Top ]

getBorderAttributes   [line 670]

mixed getBorderAttributes( [bool $asString = false])

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

Parameters:

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

[ Top ]

getCellAttributes   [line 460]

mixed getCellAttributes( [bool $asString = false])

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

Parameters:

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

[ Top ]

getCellCoordinates   [line 566]

array getCellCoordinates( )

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

[ Top ]

getCellCount   [line 412]

integer getCellCount( )

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

[ Top ]

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'.


[ Top ]

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.


[ Top ]

getProgressAttributes   [line 789]

mixed getProgressAttributes( [bool $asString = false])

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

Parameters:

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

[ Top ]

getScript   [line 852]

string getScript( )

Get the javascript code to manage progress bar.

[ Top ]

getStringAttributes   [line 725]

mixed getStringAttributes( [bool $asString = false])

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

Parameters:

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

[ Top ]

getStyle   [line 976]

string getStyle( )

Get the cascading style sheet to put inline on HTML document

[ Top ]

setBorderAttributes   [line 707]

void setBorderAttributes( mixed $attributes)

Sets the progress bar's border attributes.

Defaults are:

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


Parameters:

mixed   $attributes   —  Associative array or string of HTML tag attributes

[ Top ]

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


Parameters:

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

[ Top ]

setCellCoordinates   [line 583]

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

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

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 ]

setCellCount   [line 428]

void setCellCount( integer $cells)

Sets the number of cell in the progress bar

Parameters:

integer   $cells   —  Cell count on progress bar

[ Top ]

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'.


Parameters:

string   $way   —  fill direction (natural or reverse)

[ Top ]

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.


Parameters:

integer   $orient   —  Orientation (horizontal or vertical)

[ Top ]

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


Parameters:

mixed   $attributes   —  Associative array or string of HTML tag attributes

[ Top ]

setScript   [line 940]

void setScript( string $url)

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

Parameters:

string   $url   —  URL to the linked Progress JavaScript

[ Top ]

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


Parameters:

mixed   $attributes   —  Associative array or string of HTML tag attributes

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:24:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.