summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls')
-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;
+ }
}
/**