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

Source for file XPTheme.php

Documentation is available at XPTheme.php

  1. <?php
  2.  
  3. /**
  4.  * <p>Title: XP Theme class</p>
  5.  *
  6.  * <p>Description: TeeChart for Java</p>
  7.  *
  8.  * <p>Copyright (c) 2004-2008 by Steema Software SL. All Rights Reserved.</p>
  9.  *
  10.  * <p>Company: Steema Software SL</p>
  11.  *
  12.  */
  13.  
  14.  class XPTheme extends DefaultTheme {
  15.  
  16.     /**
  17.      * Description of Classic theme
  18.      *
  19.      * @param IBaseChart
  20.      */
  21.     public function XPTheme($c{
  22.         parent::DefaultTheme($c);  
  23.     }
  24.  
  25.     public function toString({
  26.         return Language::getString("XPTheme");
  27.     }
  28.  
  29.     public function apply({
  30.         parent::apply();  
  31.  
  32.         $this->chart->getPanel()->getPen()->setWidth(3);
  33.         $this->chart->getPanel()->getPen()->setColor(Color::fromRgb(41122223));
  34.  
  35.         $this->chart->getPanel()->setBorderRound(0);
  36.         
  37.         $this->chart->getLegend()->getShadow()->setVisible(true);
  38.         $this->chart->getLegend()->getShadow()->setSize(5);
  39.         $this->chart->getLegend()->getShadow()->setColor(Color::BLACK());
  40.         
  41.         $this->chart->getPanel()->setColor(Color::WHITE());
  42.         
  43.         $this->chart->getPanel()->getGradient()->setVisible(true);
  44.         $this->chart->getPanel()->getGradient()->setEndColor(Color::fromRgb(177177177));
  45.         $this->chart->getPanel()->getGradient()->setStartColor(Color::fromRgb(255,255,255));
  46. // TODO         $this->chart->getPanel().getGradient()->setDirection(GradientDirectionBACKDIAGONAL);
  47.         $this->chart->getPanel()->getGradient()->setDirection(GradientDirection::$VERTICAL);
  48.  
  49.         $this->doChangeWall($this->chart->getWalls()->getLeft());
  50.         $this->doChangeWall($this->chart->getWalls()->getRight());
  51.         $this->doChangeWall($this->chart->getWalls()->getBack());
  52.         $this->doChangeWall($this->chart->getWalls()->getBottom());
  53.  
  54.         $this->chart->getWalls()->getBack()->setTransparent(false);        
  55.  
  56.     }
  57.  
  58.     private function doChangeWall($wall{
  59.         $wall->getGradient()->setVisible(true);
  60.         $tmp Theme::getWindowsXPPalette();
  61.         $wall->getGradient()->setStartColor($tmp[2]);
  62.         $wall->getGradient()->setEndColor($tmp[1]);
  63.     }
  64. }
  65. ?>

Documentation generated on Wed, 16 Jun 2010 12:09:25 +0200 by phpDocumentor 1.4.1