From 817da66e1cb3548f728db9ff4a96e783ed7522b5 Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 22 Jun 2006 11:55:46 +0000 Subject: Update callback adapter --- framework/Web/UI/WebControls/TStyle.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'framework/Web/UI/WebControls/TStyle.php') diff --git a/framework/Web/UI/WebControls/TStyle.php b/framework/Web/UI/WebControls/TStyle.php index 6bc413e4..597229ea 100644 --- a/framework/Web/UI/WebControls/TStyle.php +++ b/framework/Web/UI/WebControls/TStyle.php @@ -54,6 +54,15 @@ class TStyle extends TComponent $this->copyFrom($style); } + /** + * Need to clone the font object. + */ + public function __clone() + { + if(!is_null($this->_font)) + $this->_font = clone($this->_font); + } + /** * @return string the background color of the control */ @@ -139,6 +148,14 @@ class TStyle extends TComponent return $this->_class===null?'':$this->_class; } + /** + * @return boolean true if CSS is set or empty. + */ + public function hasCssClass() + { + return !is_null($this->_class); + } + /** * @param string the name of the CSS class of the control */ @@ -156,6 +173,14 @@ class TStyle extends TComponent $this->_font=new TFont; return $this->_font; } + + /** + * @return boolean true if font is set. + */ + public function hasFont() + { + return $this->_font !== null; + } /** * @return string the foreground color of the control @@ -337,6 +362,14 @@ class TStyle extends TComponent if($this->_class!==null) $writer->addAttribute('class',$this->_class); } + + /** + * @return array list of style fields. + */ + public function getStyleFields() + { + return $this->_fields; + } } /** -- cgit v1.2.3