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

Source for file AnnotationCallout.php

Documentation is available at AnnotationCallout.php

  1. <?php
  2.  
  3. /**
  4.  * AnnotationCallout class
  5.  *
  6.  * Description:
  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 tools
  13.  * @link http://www.steema.com
  14.  */
  15.  
  16. class AnnotationCallout extends Callout
  17. {
  18.  
  19.    private $x 0;
  20.    private $y 0;
  21.    private $z 0;
  22.  
  23.     // Interceptors
  24.     function __get$property {
  25.       $method ="get{$property}";
  26.       if method_exists$this$method ) ) {
  27.         return $this->$method();
  28.       }
  29.     }
  30.  
  31.     function __set $property,$value {
  32.       $method ="set{$property}";
  33.       if method_exists$this$method ) ) {
  34.         return $this->$method($value);
  35.       }
  36.     }
  37.  
  38.    public function AnnotationCallout($s)
  39.    {
  40.       parent::Callout($s);
  41.       $this->getArrow()->setVisible(false);
  42.       $this->setVisible(false);
  43.    }
  44.  
  45.    protected function closerPoint($r$p)
  46.    {
  47.       if($p->getX($r->getRight())
  48.       {
  49.          $this->tmpX $r->getRight();
  50.       }
  51.       else
  52.          if($p->getX($r->getLeft())
  53.          {
  54.             $this->tmpX $r->getLeft();
  55.          }
  56.          else
  57.          {
  58.             $this->tmpX ($r->getLeft($r->getRight()) 2;
  59.          }
  60.  
  61.       if($p->getY($r->getBottom())
  62.       {
  63.          $this->tmpY $r->getBottom();
  64.       }
  65.       else
  66.          if($p->getY($r->getTop())
  67.          {
  68.             $this->tmpY $r->getTop();
  69.          }
  70.          else
  71.          {
  72.             $this->tmpY ($r->getTop($r->getBottom()) 2;
  73.          }
  74.  
  75.       return new TeePoint($this->tmpX$this->tmpY);
  76.    }
  77.  
  78.    /**
  79.    * The X pixel coordinate of the ending point of the annotation callout
  80.    * line.
  81.    *
  82.    * @return int 
  83.    */
  84.    public function getXPosition()
  85.    {
  86.       return $this->x;
  87.    }
  88.  
  89.    /**
  90.    * Sets the X pixel coordinate of the ending point of the annotation callout
  91.    * line.
  92.    *
  93.    * @param value int
  94.    */
  95.    public function setXPosition($value)
  96.    {
  97.       if($this->!= $value)
  98.       {
  99.          $this->$value;
  100.          $this->invalidate();
  101.       }
  102.    }
  103.  
  104.    /**
  105.    * The Y pixel coordinate of the ending point of the annotation callout
  106.    * line.
  107.    *
  108.    * @return int 
  109.    */
  110.    public function getYPosition()
  111.    {
  112.       return $this->y;
  113.    }
  114.  
  115.    /**
  116.    * Sets the Y pixel coordinate of the ending point of the annotation callout
  117.    * line.
  118.    *
  119.    * @param value int
  120.    */
  121.    public function setYPosition($value)
  122.    {
  123.       if($this->!= $value)
  124.       {
  125.          $this->$value;
  126.          $this->invalidate();
  127.       }
  128.    }
  129.  
  130.    /**
  131.    * The Z pixel coordinate of the ending point of the annotation callout
  132.    * line.
  133.    *
  134.    * @return int 
  135.    */
  136.    public function getZPosition()
  137.    {
  138.       return $this->z;
  139.    }
  140.  
  141.    /**
  142.    * Sets the Z pixel coordinate of the ending point of the annotation callout
  143.    * line.
  144.    *
  145.    * @param value int
  146.    */
  147.    public function setZPosition($value)
  148.    {
  149.       if($this->!= $value)
  150.       {
  151.          $this->$value;
  152.          $this->invalidate();
  153.       }
  154.    }
  155. }
  156.  
  157. ?>

Documentation generated on Wed, 16 Jun 2010 12:02:31 +0200 by phpDocumentor 1.4.1