Source for file BackgroundImageSP.class.php

Documentation is available at BackgroundImageSP.class.php

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

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