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

Source for file TeeBase.php

Documentation is available at TeeBase.php

  1. <?php
  2.  
  3. /**
  4.  * TeeBase class
  5.  *
  6.  * Description: Non-visible class for Chart element common characteristics
  7.  *
  8.  * @author
  9.  * @copyright (c) 1995-2010 by Steema Software SL. All Rights Reserved. <info@steema.com>
  10.  * @version 1.0
  11.  * @package TeeChartPHP
  12.  * @link http://www.steema.com
  13.  */
  14.  
  15. class TeeBase {
  16.  
  17.     public $chart;
  18.  
  19.     // Interceptors
  20.     function __get$property {
  21.       $method ="get{$property}";
  22.       if method_exists$this$method ) ) {
  23.         return $this->$method();
  24.       }
  25.     }
  26.  
  27.     function __set $property,$value {
  28.       $method ="set{$property}";
  29.       if method_exists$this$method ) ) {
  30.         return $this->$method($value);
  31.       }
  32.     }
  33.  
  34.     function __construct($_chart{
  35.         $this->chart = $_chart;
  36.     }
  37.  
  38.     /**
  39.      * Chart associated with this object.
  40.      *
  41.      * @return IBaseChart 
  42.      */
  43.     public function getChart({
  44.         return $this->chart;
  45.     }
  46.  
  47.     /**
  48.      * Chart associated with this object.
  49.      *
  50.      * @param value IBaseChart
  51.      */
  52.     public function setChart($value{
  53.         $this->chart = $value;
  54.     }
  55.  
  56.     protected function setColorProperty($variable,$value{
  57.         if ($variable != $value{
  58.             $variable $value;
  59.             $this->invalidate();
  60.         }
  61.         return $variable;
  62.     }
  63.  
  64.     protected function _setColorProperty($variable$value{
  65.         if ($variable != $value{
  66.             $variable $value;
  67.             $this->invalidate();
  68.         }
  69.         return new Color($variable);
  70.     }
  71.  
  72.     protected function setIntegerProperty($variable$value{
  73.         if ($variable != $value{
  74.             $variable $value;
  75.             $this->invalidate();
  76.         }
  77.         return $variable;
  78.     }
  79.  
  80.     protected function setDoubleProperty($variable$value{
  81.         if ($variable != $value{
  82.             $variable $value;
  83.             $this->invalidate();
  84.         }
  85.         return $variable;
  86.     }
  87.  
  88.     /**
  89.      *
  90.      *
  91.      * @param variable boolean. Boolean variable to change.
  92.      * @param value boolean. New value.
  93.      * @return boolean 
  94.      */
  95.     protected function setBooleanProperty($variable$value{
  96.         if ($variable != $value{
  97.             $variable $value;
  98.             $this->invalidate();
  99.         }
  100.         return $variable;
  101.     }
  102.  
  103.     protected function setStringProperty($variable$value{
  104.         if ($variable !=$value{
  105.             $variable $value;
  106.             $this->invalidate();
  107.         }
  108.         return $variable;
  109.     }
  110.  
  111.     /**
  112.      * Use invalidate when the entire canvas needs to be repainted.
  113.      *
  114.      */
  115.     public function invalidate({
  116.         if ($this->chart != null{
  117.             $this->chart->doBaseInvalidate();
  118.         }
  119.     }
  120. }
  121.  
  122. ?>

Documentation generated on Wed, 16 Jun 2010 12:08:34 +0200 by phpDocumentor 1.4.1