home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / ui.setborderattributes.cls < prev    next >
Encoding:
Text File  |  2004-03-24  |  3.9 KB  |  139 lines

  1. <refentry id="{@id}">
  2.  <refnamediv>
  3.   <refname>setBorderAttributes Manual</refname>
  4.   <refpurpose>defines look and feel of the progress bar border</refpurpose>
  5.  </refnamediv>
  6.  <refsynopsisdiv>
  7.   <refsynopsisdivinfo>
  8.    <author>
  9.     by Laurent Laville
  10.     <authorblurb>{@link mailto:pear@laurent-laville.org}</authorblurb>
  11.    </author>
  12.    <copyright>November 2003, Laurent Laville</copyright>
  13.    <releaseinfo>HTML_Progress 1.0+</releaseinfo>
  14.   </refsynopsisdivinfo>
  15.  </refsynopsisdiv>
  16.  <refsect1 id="{@id synopsis}">
  17.   <title>Synopsis</title>
  18.   <para><emphasis>void</emphasis> <important>setBorderAttributes</important>( $attributes )</para>
  19.  </refsect1>
  20.  <refsect1 id="{@id attributes}">
  21.   <title>Attributes</title>
  22.   <para>
  23.    <table frame="all">
  24.     <tgroup cols="3">
  25.     <thead align="center">
  26.       <row>
  27.        <entry><important>Name</important></entry>
  28.        <entry><important>Type</important></entry>
  29.        <entry><important>Default</important></entry>
  30.       </row>
  31.     </thead>
  32.     <tbody>
  33.      <row>
  34.       <entry><emphasis>attributes</emphasis> </entry>
  35.       <entry>array                  </entry>
  36.       <entry>
  37.        <itemizedlist>
  38.         <listitem>class => progressBarBorder    </listitem>
  39.         <listitem>width => 0                    </listitem>
  40.         <listitem>style => solid (dashed, dotted, inset, outset)    </listitem>
  41.         <listitem>color => #000000              </listitem>
  42.        </itemizedlist>
  43.       </entry>
  44.      </row>
  45.     </tbody>
  46.     </tgroup>
  47.    </table>
  48.   </para>
  49.   <para>
  50.    <emphasis>$attributes</emphasis> is an associative array or string of HTML tag attributes.
  51.   </para>
  52.  </refsect1>
  53.  <refsect1 id="{@id description}">
  54.   <title>Description</title>
  55.   <para>The <emphasis>setBorderAttributes()</emphasis> method is used to give a look and feel,
  56.    such as size, style and color, to the progress bar border.
  57.   </para>
  58.   <para>
  59.   <tip><title></title>
  60.    You may also used an existing StyleSheet and a CSS class-selector with pre-defined style.
  61.    For example:
  62.    <para>
  63.    <programlisting role="php">
  64.    <![CDATA[
  65. <?php
  66. ...
  67. // specify a user-ident (instead of the auto-generated value)
  68. $bar->setIdent('PB1');  
  69. ...
  70. $ui =& $bar->getUI();
  71. $ui->setBorderAttributes('class="myProgressBorder"');
  72. ...
  73. ?>
  74.    ]]>
  75.    </programlisting>
  76.    <example>
  77.    <![CDATA[
  78. <!-- custom stylesheet -->
  79. ...
  80. .PB1 .myProgressBar { border: 3px dotted #0000FF; }
  81. ...
  82.    ]]>
  83.    </example>
  84.    </para>
  85.    <para><graphic fileref="../media/screenshots/border3.png"></graphic></para>
  86.   </tip>
  87.   </para>
  88.  </refsect1>
  89.  <refsect1 id="{@id example}">
  90.   <title>Example</title>
  91.   <para>
  92.    Example below will produced a progress bar with a solid navy border. It's a static example, 
  93.    the progress bar will not run.
  94.    <para><graphic fileref="../media/screenshots/border2.png"></graphic></para>
  95.    <programlisting role="php">
  96.    <![CDATA[
  97. <?php
  98. require_once ('HTML/Progress.php');
  99.  
  100. $bar = new HTML_Progress();
  101. $bar->setBorderPainted(true);
  102.  
  103. $ui =& $bar->getUI();
  104. $ui->setCellAttributes('active-color=#3874B4 inactive-color=#EEEECC width=10');
  105. $ui->setBorderAttributes('width=1 color=navy');
  106. $ui->setStringAttributes('width=60 font-size=14 background-color=#EEEEEE');
  107.  
  108. ?>
  109. <!DOCTYPE html
  110.     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  111.     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  112.  
  113. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  114. <head>
  115. <title>ProgressBar </title>
  116. <style type="text/css">
  117. <!--
  118. <?php echo $bar->getStyle(); ?>
  119. // -->
  120. </style>
  121. <body>
  122.  
  123. <?php echo $bar->toHtml(); ?>
  124.  
  125. </body>
  126. </html>
  127.    ]]>
  128.    </programlisting>
  129.   </para>
  130.  </refsect1>
  131.  <refsect1 id="{@id seealso}">
  132.   <title>See Also</title>
  133.   <para>
  134.    To display the progress bar border, take care that {@tutorial progress.setborderpainted.cls} 
  135.    method was also invoked.
  136.   </para>
  137.  </refsect1>
  138. </refentry>
  139.