summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TStyle.php
diff options
context:
space:
mode:
authorwei <>2006-06-22 11:55:46 +0000
committerwei <>2006-06-22 11:55:46 +0000
commit817da66e1cb3548f728db9ff4a96e783ed7522b5 (patch)
tree6a994ae26d05054a9becaa82d8839cc778c56113 /framework/Web/UI/WebControls/TStyle.php
parent99ea5b7b4b90d0298f47223c0fc832b30c1903eb (diff)
Update callback adapter
Diffstat (limited to 'framework/Web/UI/WebControls/TStyle.php')
-rw-r--r--framework/Web/UI/WebControls/TStyle.php33
1 files changed, 33 insertions, 0 deletions
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
@@ -55,6 +55,15 @@ class TStyle extends TComponent
}
/**
+ * 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
*/
public function getBackColor()
@@ -140,6 +149,14 @@ class TStyle extends TComponent
}
/**
+ * @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
*/
public function setCssClass($value)
@@ -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;
+ }
}
/**