Source for file OverflowSC.class.php

Documentation is available at OverflowSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The OverflowSC represents CSS overflow values. The allowed values are:
  7. * <ul style="font-family: monospace;">
  8. * <li> visible </li>
  9. * <li> hidden </li>
  10. * <li> scroll </li>
  11. * <li> auto </li>
  12. * </ul>
  13. * <br /><br />
  14. * The <code>StyleComponent</code> (SC) is the most basic of the three building pieces
  15. * of CSS styles. It combines a CSS property value with a ValidatorRule to ensure that
  16. * the value follows a certain format.<br /><br />
  17. *
  18. * @package harmoni.gui.scs
  19. *
  20. * @copyright Copyright &copy; 2005, Middlebury College
  21. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  22. *
  23. * @version $Id: OverflowSC.class.php,v 1.7 2006/08/15 20:44:58 sporktim Exp $
  24. */
  25. class OverflowSC extends StyleComponent {
  26.  
  27. /**
  28. * The constructor.
  29. * @param string value The value to assign to this SC.
  30. * @access public
  31. ***/
  32. function OverflowSC($value) {
  33. $options = array("visible", "hidden", "scroll", "auto");
  34. $errDescription = "Could not validate the overflow StyleComponent value \"%s\". ";
  35. $errDescription .= "Allowed values are ".implode(", ", $options).".";
  36. $displayName = "Overflow";
  37. $description = "Specifies the overflow property value. Allowed values are: ".implode(", ", $options).".";
  38. $rule = RegexValidatorRule::getRuleByArray($options);
  39. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  40. }
  41. }
  42. ?>

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