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

Source for file ColorList.php

Documentation is available at ColorList.php

  1. <?php
  2.  
  3. /**
  4.  * ColorList class
  5.  *
  6.  * Description:The ColorList class is manipulated via Series->Colors
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @subpackage styles
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16.  class ColorList extends ArrayObject {
  17.  
  18.     // Interceptors
  19.     function __get$property {
  20.       $method ="get{$property}";
  21.       if method_exists$this$method ) ) {
  22.         return $this->$method();
  23.       }
  24.     }
  25.  
  26.     function __set $property,$value {
  27.       $method ="set{$property}";
  28.       if method_exists$this$method ) ) {
  29.         return $this->$method($value);
  30.       }
  31.     }
  32.  
  33.     /**
  34.     * The class constructor.
  35.     */
  36.     public function ColorList($capacity{
  37.     }
  38.  
  39.     public function getCount({
  40.         return sizeof($this);
  41.     }
  42.  
  43.     public function getColor($index{
  44.         $tmpColor new Color(0,0,0,0,true);
  45.         return ($index $this->getCount()) $this->offsetGet($index$tmpColor;
  46.     }
  47.  
  48.     public function setColor($index$value{
  49.         while ($this->getCount(<= $index{
  50.             $tmpColor new Color(0,0,0,0,true);
  51.             $this->append($tmpColor);
  52.         }
  53.         $this->offsetSet($index$value);
  54.     }
  55.  
  56.     public function removeRange($startIndex$count{
  57.  // TODO       parent::removeRange($startIndex, $startIndex + $count - 1);
  58.     }
  59.  
  60.     function exchange($a$b{
  61.                 $c $this->getColor($a);
  62.                 $this->setColor($a$this->getColor($b));
  63.                 $this->setColor($b$c);
  64.     }
  65. }
  66. ?>

Documentation generated on Wed, 16 Jun 2010 12:04:37 +0200 by phpDocumentor 1.4.1