diff options
author | xue <> | 2006-01-31 21:27:51 +0000 |
---|---|---|
committer | xue <> | 2006-01-31 21:27:51 +0000 |
commit | bbb5ba2761529a2f477589623b2b76b10d6f8803 (patch) | |
tree | 0a038fe9376e4226a5c08a9dec2f39215d526f6e /framework/Web/UI/WebControls/TTableHeaderCell.php | |
parent | a349f11b4caec0d7e82e3327d79db1b0a30642fc (diff) |
Split TTable.php file into individual class files. Modified TRepeater demo 2.
Diffstat (limited to 'framework/Web/UI/WebControls/TTableHeaderCell.php')
-rw-r--r-- | framework/Web/UI/WebControls/TTableHeaderCell.php | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TTableHeaderCell.php b/framework/Web/UI/WebControls/TTableHeaderCell.php new file mode 100644 index 00000000..12009de6 --- /dev/null +++ b/framework/Web/UI/WebControls/TTableHeaderCell.php @@ -0,0 +1,104 @@ +<?php
+/**
+ * TTableHeaderCell class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2005 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
+ * @package System.Web.UI.WebControls
+ */
+
+/**
+ * Includes TTableCell class
+ */
+Prado::using('System.Web.UI.WebControls.TTableCell');
+
+
+/**
+ * TTableHeaderCell class.
+ *
+ * TTableHeaderCell displays a table header cell on a Web page.
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @version $Revision: $ $Date: $
+ * @package System.Web.UI.WebControls
+ * @since 3.0
+ */
+class TTableHeaderCell extends TTableCell
+{
+ /**
+ * @return string tag name for the table header cell
+ */
+ protected function getTagName()
+ {
+ return 'th';
+ }
+
+ /**
+ * Adds attributes to renderer.
+ * @param THtmlWriter the renderer
+ */
+ protected function addAttributesToRender($writer)
+ {
+ parent::addAttributesToRender($writer);
+ if(($scope=$this->getScope())!=='NotSet')
+ $writer->addAttribute('scope',$scope==='Row'?'row':'col');
+ if(($text=$this->getAbbreviatedText())!=='')
+ $writer->addAttribute('abbr',$text);
+ if(($text=$this->getCategoryText())!=='')
+ $writer->addAttribute('axis',$text);
+ }
+
+ /**
+ * @return string the scope of the cells that the header cell applies to. Defaults to 'NotSet'.
+ */
+ public function getScope()
+ {
+ return $this->getViewState('Scope','NotSet');
+ }
+
+ /**
+ * @param string the scope of the cells that the header cell applies to.
+ * Valid values include 'NotSet','Row','Column'.
+ */
+ public function setScope($value)
+ {
+ $this->setViewState('Scope',TPropertyValue::ensureEnum($value,'NotSet','Row','Column'),'NotSet');
+ }
+
+ /**
+ * @return string the abbr attribute of the HTML th element
+ */
+ public function getAbbreviatedText()
+ {
+ return $this->getViewState('AbbreviatedText','');
+ }
+
+ /**
+ * @param string the abbr attribute of the HTML th element
+ */
+ public function setAbbreviatedText($value)
+ {
+ $this->setViewState('AbbreviatedText',$value,'');
+ }
+
+ /**
+ * @return string the axis attribute of the HTML th element
+ */
+ public function getCategoryText()
+ {
+ return $this->getViewState('CategoryText','');
+ }
+
+ /**
+ * @param string the axis attribute of the HTML th element
+ */
+ public function setCategoryText($value)
+ {
+ $this->setViewState('CategoryText',$value,'');
+ }
+}
+
+?>
\ No newline at end of file |