Source for file BackgroundSP.class.php

Documentation is available at BackgroundSP.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleProperty.class.php");
  4. require_once(HARMONI."GUIManager/StyleComponents/ColorSC.class.php");
  5. require_once(HARMONI."GUIManager/StyleComponents/UrlSC.class.php");
  6. require_once(HARMONI."GUIManager/StyleComponents/BackgroundRepeatSC.class.php");
  7. require_once(HARMONI."GUIManager/StyleComponents/BackgroundAttachmentSC.class.php");
  8.  
  9. /**
  10. * The BackgroundSP represents the 'background' StyleProperty.
  11. *
  12. * A StyleProperty (SP) is one of the tree building pieces of CSS styles. It stores
  13. * information about a single CSS style property by storing one or more
  14. * <code>StyleComponents</code>.
  15. *
  16. * The other two CSS styles building pieces are <code>StyleComponents</code> and
  17. * <code>StyleCollections</code>.
  18. *
  19. * @package harmoni.gui.sps
  20. *
  21. * @copyright Copyright &copy; 2005, Middlebury College
  22. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  23. *
  24. * @version $Id: BackgroundSP.class.php,v 1.5 2006/06/02 15:56:07 cws-midd Exp $
  25. */
  26. class BackgroundSP extends StyleProperty {
  27.  
  28. /**
  29. * The constructor.
  30. * @access public
  31. * @param string value The HTML color value for this SP.
  32. ***/
  33. function BackgroundSP($color, $url, $repeat, $attachment) {
  34. $this->StyleProperty("background", "Background", "This property specifies the background settings.");
  35. if (!is_null($color)) $this->addSC(new ColorSC($color));
  36. if (!is_null($url)) $this->addSC(new UrlSC($url));
  37. if (!is_null($repeat)) $this->addSC(new BackgroundRepeatSC($repeat));
  38. if (!is_null($attachment)) $this->addSC(new BackgroundAttachmentSC($attachment));
  39. }
  40.  
  41. }
  42.  
  43. ?>

Documentation generated on Wed, 19 Sep 2007 10:21:43 -0400 by phpDocumentor 1.3.0RC3