From 6845c00a3f752abecd9ef763848329bceaf63df4 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 31 Mar 2006 12:42:22 +0000 Subject: Reorganized folders under framework. This may break existing applications. --- framework/Web/UI/TControl.php | 41 ++++++++++++++++++++++ framework/Web/UI/WebControls/TBaseDataList.php | 3 +- framework/Web/UI/WebControls/TCompareValidator.php | 2 +- framework/Web/UI/WebControls/TDataGridColumn.php | 5 +++ .../Web/UI/WebControls/TDataTypeValidator.php | 2 +- framework/Web/UI/WebControls/TDatePicker.php | 12 +++---- framework/Web/UI/WebControls/TListControl.php | 4 +++ framework/Web/UI/WebControls/TRangeValidator.php | 2 +- framework/Web/UI/WebControls/TWizard.php | 1 + 9 files changed, 62 insertions(+), 10 deletions(-) (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index dba58555..52ec9bb1 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -1865,6 +1865,47 @@ interface IBroadcastEventReceiver public function broadcastEventReceived($sender,$param); } +/** + * ITheme interface. + * + * This interface must be implemented by theme. + * + * @author Qiang Xue + * @version $Revision: $ $Date: $ + * @package System.Web.UI + * @since 3.0 + */ +interface ITheme +{ + /** + * Applies this theme to the specified control. + * @param TControl the control to be applied with this theme + */ + public function applySkin($control); +} + +/** + * ITemplate interface + * + * ITemplate specifies the interface for classes encapsulating + * parsed template structures. + * + * @author Qiang Xue + * @version $Revision: $ $Date: $ + * @package System.Web.UI + * @since 3.0 + */ +interface ITemplate +{ + /** + * Instantiates the template. + * Content in the template will be instantiated as components and text strings + * and passed to the specified parent control. + * @param TControl the parent control + */ + public function instantiateIn($parent); +} + /** * TBroadcastEventParameter class * diff --git a/framework/Web/UI/WebControls/TBaseDataList.php b/framework/Web/UI/WebControls/TBaseDataList.php index b7c79cbe..479fb2ef 100644 --- a/framework/Web/UI/WebControls/TBaseDataList.php +++ b/framework/Web/UI/WebControls/TBaseDataList.php @@ -11,9 +11,10 @@ */ /** - * Includes TDataBoundControl class + * Includes TDataBoundControl and TDataFieldAccessor classes */ Prado::using('System.Web.UI.WebControls.TDataBoundControl'); +Prado::using('System.Util.TDataFieldAccessor'); /** * TBaseDataList class diff --git a/framework/Web/UI/WebControls/TCompareValidator.php b/framework/Web/UI/WebControls/TCompareValidator.php index 811ca50a..1bf4c529 100644 --- a/framework/Web/UI/WebControls/TCompareValidator.php +++ b/framework/Web/UI/WebControls/TCompareValidator.php @@ -201,7 +201,7 @@ class TCompareValidator extends TBaseValidator $dateFormat = $this->getDateFormat(); if($dateFormat!=='') { - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter', $dateFormat); + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat); return array($formatter->parse($value1), $formatter->parse($value2)); } else diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php index e8cc81aa..de9d9d5c 100644 --- a/framework/Web/UI/WebControls/TDataGridColumn.php +++ b/framework/Web/UI/WebControls/TDataGridColumn.php @@ -10,6 +10,11 @@ * @package System.Web.UI.WebControls */ +/** + * Includes TDataFieldAccessor class + */ +Prado::using('System.Util.TDataFieldAccessor'); + /** * TDataGridColumn class * diff --git a/framework/Web/UI/WebControls/TDataTypeValidator.php b/framework/Web/UI/WebControls/TDataTypeValidator.php index f3cf5a3c..81c23ce4 100644 --- a/framework/Web/UI/WebControls/TDataTypeValidator.php +++ b/framework/Web/UI/WebControls/TDataTypeValidator.php @@ -91,7 +91,7 @@ class TDataTypeValidator extends TBaseValidator $dateFormat = $this->getDateFormat(); if(strlen($dateFormat)) { - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter',$dateFormat); + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$dateFormat); return $formatter->isValidDate($value); } else diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php index 8d6d45e4..0d30636c 100644 --- a/framework/Web/UI/WebControls/TDatePicker.php +++ b/framework/Web/UI/WebControls/TDatePicker.php @@ -256,7 +256,7 @@ class TDatePicker extends TTextBox public function setDate($value) { $date = TPropertyValue::ensureInteger($value); - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter', + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $this->getDateFormat()); $this->setText($formatter->format($date)); } @@ -358,7 +358,7 @@ class TDatePicker extends TTextBox $date = @mktime(0, 0, 0, $month, $day, $year); $pattern = $this->getDateFormat(); $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter', $pattern); + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $pattern); return $formatter->format($date); } @@ -452,7 +452,7 @@ class TDatePicker extends TTextBox protected function hasDayPattern() { - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter', + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $this->getDateFormat()); return !is_null($formatter->getDayPattern()); } @@ -464,7 +464,7 @@ class TDatePicker extends TTextBox */ protected function renderCalendarSelections($writer, $date) { - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter', + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $this->getDateFormat()); foreach($formatter->getDayMonthYearOrdering() as $type) { @@ -485,7 +485,7 @@ class TDatePicker extends TTextBox { $pattern = $this->getDateFormat(); $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter',$pattern); + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$pattern); return $formatter->parse($this->getText()); } @@ -550,7 +550,7 @@ class TDatePicker extends TTextBox */ protected function getLocalizedMonthNames($info) { - $formatter = Prado::createComponent('System.Data.TSimpleDateFormatter', + $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter', $this->getDateFormat()); switch($formatter->getMonthPattern()) { diff --git a/framework/Web/UI/WebControls/TListControl.php b/framework/Web/UI/WebControls/TListControl.php index 3d73556a..ccbce4d6 100644 --- a/framework/Web/UI/WebControls/TListControl.php +++ b/framework/Web/UI/WebControls/TListControl.php @@ -18,6 +18,10 @@ Prado::using('System.Web.UI.WebControls.TDataBoundControl'); * Includes TAttributeCollection class */ Prado::using('System.Collections.TAttributeCollection'); +/** + * Includes TDataFieldAccessor class + */ +Prado::using('System.Util.TDataFieldAccessor'); /** * TListControl class diff --git a/framework/Web/UI/WebControls/TRangeValidator.php b/framework/Web/UI/WebControls/TRangeValidator.php index 842797ba..7ded3e71 100644 --- a/framework/Web/UI/WebControls/TRangeValidator.php +++ b/framework/Web/UI/WebControls/TRangeValidator.php @@ -226,7 +226,7 @@ class TRangeValidator extends TBaseValidator $dateFormat = $this->getDateFormat(); if($dateFormat!=='') { - $formatter=Prado::createComponent('System.Data.TSimpleDateFormatter', $dateFormat); + $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat); $value = $formatter->parse($value, $dateFormat); if($minValue!=='') $valid=$valid && ($value>=$formatter->parse($minValue)); diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php index 0b44872b..ef4691bd 100644 --- a/framework/Web/UI/WebControls/TWizard.php +++ b/framework/Web/UI/WebControls/TWizard.php @@ -16,6 +16,7 @@ Prado::using('System.Web.UI.WebControls.TButton'); Prado::using('System.Web.UI.WebControls.TLinkButton'); Prado::using('System.Web.UI.WebControls.TImageButton'); Prado::using('System.Web.UI.WebControls.TDataList'); +Prado::using('System.Collections.TStack'); /** * Class TWizard. -- cgit v1.2.3