当前位置: 首页>>代码示例>>PHP>>正文


PHP HTML_Progress::setIdent方法代码示例

本文整理汇总了PHP中HTML_Progress::setIdent方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Progress::setIdent方法的具体用法?PHP HTML_Progress::setIdent怎么用?PHP HTML_Progress::setIdent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML_Progress的用法示例。


在下文中一共展示了HTML_Progress::setIdent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 */
require_once 'HTML/Progress.php';
$bar1 = new HTML_Progress(HTML_PROGRESS_BAR_VERTICAL);
$bar1->setAnimSpeed(20);
$bar1->setIdent('PB1');
$bar1->setIncrement(10);
$bar1->setBorderPainted(true);
$ui1 =& $bar1->getUI();
$ui1->setFillWay('natural');
$ui1->setCellCount(15);
$ui1->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=50 height=13');
$ui1->setBorderAttributes('width=1 color=#000000');
$ui1->setStringAttributes(array('font-size' => 8, 'color' => '#FF0000', 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'bottom'));
$bar2 = new HTML_Progress(HTML_PROGRESS_BAR_VERTICAL);
$bar2->setAnimSpeed(20);
$bar2->setIdent('PB2');
$bar2->setIncrement(5);
$bar2->setBorderPainted(true);
$ui2 =& $bar2->getUI();
$ui2->setFillWay('reverse');
$ui2->setCellCount(15);
$ui2->setCellAttributes('active-color=#3874B4 inactive-color=#FFDDAA width=50 height=13');
$ui2->setBorderAttributes('width=1 style=dashed color=#000000');
$ui2->setStringAttributes(array('font-size' => 8, 'color' => 'navy', 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'bottom'));
?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
开发者ID:Ogwang,项目名称:sainp,代码行数:31,代码来源:vertical.php

示例2: createProgressBar

 /**
  * Creates a progress bar with options choosen on all wizard tabs.
  *
  * @since      1.1
  * @access     public
  */
 function createProgressBar()
 {
     $progress = $this->exportValues();
     $bar = new HTML_Progress();
     $bar->setIdent('PB1');
     $bar->setAnimSpeed(intval($progress['rAnimSpeed']));
     if ($progress['model'] != '') {
         $bar->setModel($progress['model'], 'iniCommented');
         $bar->setIncrement(10);
         $ui =& $bar->getUI();
     } else {
         $bar->setBorderPainted($progress['borderpainted'] == '1');
         $bar->setStringPainted($progress['stringpainted'] == '1');
         $ui =& $bar->getUI();
         $structure = array();
         /* Page 1: Progress attributes **************************************************/
         if (strlen(trim($progress['progressclass'])) > 0) {
             $structure['progress']['class'] = $progress['progressclass'];
         }
         if (strlen(trim($progress['progresssize']['bgcolor'])) > 0) {
             $structure['progress']['background-color'] = $progress['progresssize']['bgcolor'];
         }
         if (strlen(trim($progress['progresssize']['width'])) > 0) {
             $structure['progress']['width'] = $progress['progresssize']['width'];
         }
         if (strlen(trim($progress['progresssize']['height'])) > 0) {
             $structure['progress']['height'] = $progress['progresssize']['height'];
         }
         $structure['progress']['auto-size'] = $progress['autosize'] == '1';
         $ui->setProgressAttributes($structure['progress']);
         $orient = $progress['shape'] == '1' ? HTML_PROGRESS_BAR_HORIZONTAL : HTML_PROGRESS_BAR_VERTICAL;
         $ui->setOrientation($orient);
         $ui->setFillWay($progress['way']);
         /* Page 2: Cell attributes ******************************************************/
         if (strlen(trim($progress['cellid'])) > 0) {
             $structure['cell']['id'] = $progress['cellid'];
         }
         if (strlen(trim($progress['cellclass'])) > 0) {
             $structure['cell']['class'] = $progress['cellclass'];
         }
         if (strlen(trim($progress['cellvalue']['min'])) > 0) {
             $bar->setMinimum(intval($progress['cellvalue']['min']));
         }
         if (strlen(trim($progress['cellvalue']['max'])) > 0) {
             $bar->setMaximum(intval($progress['cellvalue']['max']));
         }
         if (strlen(trim($progress['cellvalue']['inc'])) > 0) {
             $bar->setIncrement(intval($progress['cellvalue']['inc']));
         }
         if (strlen(trim($progress['cellsize']['width'])) > 0) {
             $structure['cell']['width'] = $progress['cellsize']['width'];
         }
         if (strlen(trim($progress['cellsize']['height'])) > 0) {
             $structure['cell']['height'] = $progress['cellsize']['height'];
         }
         if (strlen(trim($progress['cellsize']['spacing'])) > 0) {
             $structure['cell']['spacing'] = $progress['cellsize']['spacing'];
         }
         if (strlen(trim($progress['cellsize']['count'])) > 0) {
             $ui->setCellCount(intval($progress['cellsize']['count']));
         }
         if (strlen(trim($progress['cellcolor']['active'])) > 0) {
             $structure['cell']['active-color'] = $progress['cellcolor']['active'];
         }
         if (strlen(trim($progress['cellcolor']['inactive'])) > 0) {
             $structure['cell']['inactive-color'] = $progress['cellcolor']['inactive'];
         }
         if (strlen(trim($progress['cellfont']['family'])) > 0) {
             $structure['cell']['font-family'] = $progress['cellfont']['family'];
         }
         if (strlen(trim($progress['cellfont']['size'])) > 0) {
             $structure['cell']['font-size'] = $progress['cellfont']['size'];
         }
         if (strlen(trim($progress['cellfont']['color'])) > 0) {
             $structure['cell']['color'] = $progress['cellfont']['color'];
         }
         $ui->setCellAttributes($structure['cell']);
         /* Page 3: Border attributes ****************************************************/
         if (strlen(trim($progress['borderclass'])) > 0) {
             $structure['border']['class'] = $progress['borderclass'];
         }
         if (strlen(trim($progress['borderstyle']['width'])) > 0) {
             $structure['border']['width'] = $progress['borderstyle']['width'];
         }
         if (strlen(trim($progress['borderstyle']['style'])) > 0) {
             $structure['border']['style'] = $progress['borderstyle']['style'];
         }
         if (strlen(trim($progress['borderstyle']['color'])) > 0) {
             $structure['border']['color'] = $progress['borderstyle']['color'];
         }
         $ui->setBorderAttributes($structure['border']);
         /* Page 4: String attributes ****************************************************/
         if (strlen(trim($progress['stringid'])) > 0) {
             $structure['string']['id'] = $progress['stringid'];
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:urulu-svn,代码行数:101,代码来源:generator.php

示例3:

<?php

require_once 'HTML/Progress.php';
$bar = new HTML_Progress(HTML_PROGRESS_BAR_VERTICAL);
$bar->setAnimSpeed(80);
$bar->setIdent('PB1');
$bar->setIncrement(10);
$bar->setBorderPainted(true);
$bar->setStringPainted(true);
// get space for the string
$bar->setString("");
// but don't paint it
$bar->setIndeterminate(true);
// progress start in indeterminate mode
$ui =& $bar->getUI();
$ui->setCellAttributes('active-color=#970038 inactive-color=#FFDDAA width=50 height=13');
$ui->setBorderAttributes('width=1 color=#000000');
$ui->setStringAttributes(array('font-size' => 8, 'color' => '#FF0000', 'background-color' => '#C3C6C3', 'align' => 'center', 'valign' => 'bottom'));
?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>setIndeterminate example</title>
<style type="text/css">
<!--
<?php 
echo $bar->getStyle();
?>
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:31,代码来源:setindeterminate.php


注:本文中的HTML_Progress::setIdent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。