Source for file TextDecorationSC.class.php

Documentation is available at TextDecorationSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The TextDecorationSC represents CSS text-decoration values. The allowed values are:
  7. * <ul style="font-family: monospace;">
  8. * <li> none </li>
  9. * <li> underline </li>
  10. * <li> overline </li>
  11. * <li> line-through </li>
  12. * <li> blink </li>
  13. * </ul>
  14. * <br /><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: TextDecorationSC.class.php,v 1.7 2006/08/15 20:44:58 sporktim Exp $
  25. */
  26. class TextDecorationSC extends StyleComponent {
  27.  
  28. /**
  29. * The constructor.
  30. * @param string value The value to assign to this SC.
  31. * @access public
  32. ***/
  33. function TextDecorationSC($value) {
  34. $options = array("none", "underline", "overline", "line-through", "blink");
  35. $errDescription = "Could not validate the text-decoration StyleComponent value \"%s\". ";
  36. $errDescription .= "Allowed values are ".implode(", ", $options).".";
  37. $displayName = "Text Decoration";
  38. $description = "Specifies the text decoration. Allowed values are: ".implode(", ", $options).".";
  39. $rule = RegexValidatorRule::getRuleByArray($options);
  40. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  41. }
  42. }
  43. ?>

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