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

Class: HTML_Progress_UI

Source Location: /HTML_Progress-1.2.0RC3/Progress/UI.php

Class Overview

HTML_Common
   |
   --HTML_Progress_UI



Methods


Child classes:

Inherited Variables

Inherited Methods


Class Details

[line 35]


[ Top ]


Method Detail

HTML_Progress_UI (Constructor)   [line 210]

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

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

Draw all circle segment pictures
  • Since: 1.2.0
  • Access: public

Parameters:

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

[ Top ]

getBorderAttributes   [line 675]

mixed getBorderAttributes( [bool $asString = false])

Returns the progress bar's border attributes. Assoc array (defaut) or string.
  • Tutorial: ui.getborderattributes.pkg
  • See: setBorderAttributes()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

getCellAttributes   [line 463]

mixed getCellAttributes( [bool $asString = false])

Returns the common and private cell attributes. Assoc array (defaut) or string
  • Tutorial: ui.getcellattributes.pkg
  • See: setCellAttributes()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

getCellCoordinates   [line 570]

array getCellCoordinates( )

Returns the coordinates of each cell for a polygonal progress shape.
  • Return: list of cell coordinates
  • See: setCellCoordinates()
  • Since: 1.2.0
  • Access: public

[ Top ]

getCellCount   [line 413]

integer getCellCount( )

Returns the number of cell in the progress bar. The default value is 10.
  • Tutorial: ui.getcellcount.pkg
  • See: setCellCount()
  • Since: 1.0
  • Access: public

[ Top ]

getFillWay   [line 367]

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

  • Tutorial: ui.getfillway.pkg
  • See: setFillWay()
  • Since: 1.0
  • Access: public

[ Top ]

getOrientation   [line 296]

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.

  • Tutorial: ui.getorientation.pkg
  • See: setOrientation()
  • Since: 1.0
  • Access: public

[ Top ]

getProgressAttributes   [line 798]

mixed getProgressAttributes( [bool $asString = false])

Returns the progress attributes. Assoc array (defaut) or string.
  • Tutorial: ui.getprogressattributes.pkg
  • See: setProgressAttributes()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

getScript   [line 863]

string getScript( )

Get the javascript code to manage progress bar.
  • Return: JavaScript URL or inline code to manage progress bar
  • Tutorial: ui.getscript.pkg
  • 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.
  • See: setScript()
  • Since: 0.5
  • Access: public

[ Top ]

getStringAttributes   [line 732]

mixed getStringAttributes( [bool $asString = false])

Returns the string attributes. Assoc array (defaut) or string.
  • Tutorial: ui.getstringattributes.pkg
  • See: setStringAttributes()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

getStyle   [line 987]

object HTML_CSS &getStyle( )

Get the cascading style sheet to put inline on HTML document
  • Return: instance
  • Tutorial: ui.getstyle.pkg
  • Author: Stefan Neufeind <pear.neufeind@speedpartner.de> Contributor. See details on thanks section of README file.
  • Since: 0.2
  • Access: public

[ Top ]

setBorderAttributes   [line 713]

void setBorderAttributes( mixed $attributes)

Sets the progress bar's border attributes.

Defaults are:

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

  • Tutorial: ui.setborderattributes.pkg
  • See: getBorderAttributes()
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setCellAttributes   [line 521]

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

  • Tutorial: ui.setcellattributes.pkg
  • See: getCellAttributes()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setCellCoordinates   [line 587]

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

Set the coordinates of each cell for a polygonal progress shape.
  • See: getCellCoordinates()
  • Since: 1.2.0
  • Access: public

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

void setCellCount( integer $cells)

Sets the number of cell in the progress bar
  • Tutorial: ui.setcellcount.pkg
  • See: getCellCount()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

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

  • Tutorial: ui.setfillway.pkg
  • See: getFillWay()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

string   $way   —  fill direction (natural or reverse)

[ Top ]

setOrientation   [line 315]

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.

  • Tutorial: ui.setorientation.pkg
  • See: getOrientation()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

integer   $orient   —  Orientation (horizontal or vertical)

[ Top ]

setProgressAttributes   [line 845]

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

  • Tutorial: ui.setprogressattributes.pkg
  • See: getProgressAttributes()
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setScript   [line 950]

void setScript( string $url)

Set the external JavaScript code (file) to manage progress element.
  • Tutorial: ui.setscript.pkg
  • See: getScript()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

string   $url   —  URL to the linked Progress JavaScript

[ Top ]

setStringAttributes   [line 781]

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

  • Tutorial: ui.setstringattributes.pkg
  • See: getStringAttributes()
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:52:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.