Source for file DisplaySC.class.php

Documentation is available at DisplaySC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4. //require_once(HARMONI."GUIManager/StyleComponents/LengthSC.class.php");
  5.  
  6. /**
  7. * The DisplaySC represents CSS "display" values. The allowed
  8. * values are:
  9. * <ul style="font-family: monospace;">
  10. * <li> none </li>
  11. * <li> inline </li>
  12. * <li> block </li>
  13. * <li> list-item </li>
  14. * <br />
  15. * The <code>StyleComponent</code> (SC) is the most basic of the three building pieces
  16. * of CSS styles. It combines a CSS property value with a ValidatorRule to ensure that
  17. * the value follows a certain format.<br /><br />
  18. *
  19. * @package harmoni.gui.scs
  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: DisplaySC.class.php,v 1.7 2006/08/15 20:44:58 sporktim Exp $
  25. */
  26. class DisplaySC extends StyleComponent {
  27.  
  28. /**
  29. * The constructor.
  30. * @param string value The value to assign to this SC.
  31. * @access public
  32. ***/
  33. function DisplaySC($value) {
  34. $options = array("none","inline","block","list-item");
  35.  
  36. $errDescription = "Could not validate the display StyleComponent value \"%s\".
  37. Allowed values are: ".implode(", ", $options).".";
  38. $displayName = "Display";
  39. $description = "Specifies the display value to use. Allowed values are: ".implode(", ", $options).".";
  40. $rule = RegexValidatorRule::getRuleByArray($options);
  41. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  42. }
  43. }
  44. ?>

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