Source for file ZIndexSC.class.php

Documentation is available at ZIndexSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4. require_once(HARMONI."utilities/FieldSetValidator/rules/IntegerValidatorRule.class.php");
  5.  
  6. /**
  7. * The ZIndexSC represents CSS z-index values. The allowed values are:
  8. * <ul style="font-family: monospace;">
  9. * <li> auto </li>
  10. * <li> [specific z-index value] - an integer value</li>
  11. * </ul>
  12. * <br /><br />
  13. * The <code>StyleComponent</code> (SC) is the most basic of the three building pieces
  14. * of CSS styles. It combines a CSS property value with a ValidatorRule to ensure that
  15. * the value follows a certain format.<br /><br />
  16. *
  17. * @package harmoni.gui.scs
  18. *
  19. * @copyright Copyright &copy; 2005, Middlebury College
  20. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  21. *
  22. * @version $Id: ZIndexSC.class.php,v 1.9 2007/09/04 20:25:23 adamfranco Exp $
  23. */
  24. class ZIndexSC extends StyleComponent {
  25.  
  26. /**
  27. * The constructor.
  28. * @param string value The value to assign to this SC.
  29. * @access public
  30. ***/
  31. function ZIndexSC($value) {
  32. $options = array("auto");
  33. $errDescription = "Could not validate the z-index StyleComponent value \"%s\". ";
  34. $errDescription .= "Allowed values are ".implode(", ", $options)." or a
  35. specific integer value.";
  36. $rule= RegexValidatorRule::getRule("^(auto|-?[0-9]+)$");
  37. $displayName = "Z-Index";
  38. $description = "Specifies the z-index. Allowed values are: ".implode(", ", $options).".
  39. or a specific integer value.";
  40. $this->StyleComponent($value, $rule, $options, false, $errDescription, $displayName, $description);
  41. }
  42. }
  43.  
  44.  
  45. ?>

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