root/framework/branches/2.0/includes/qcubed/_core/base_controls/QSortableGen.class.php @ 1295

Revision 1295, 24.4 KB (checked in by vakopian, 19 months ago)

code by sp (experimental branch qcubed21), modified and reviewed by vakopian. Fixes #717

Line 
1<?php
2        /**
3         * The abstract QSortableGen class defined here is
4         * code-generated and contains options, events and methods scraped from the
5         * JQuery UI documentation Web site. It is not generated by the typical
6         * codegen process, but rather is generated periodically by the core QCubed
7         * team and checked in. However, the code to generate this file is
8         * in the assets/_core/php/_devetools/jquery_ui_gen/jq_control_gen.php file
9         * and you can regenerate the files if you need to.
10         *
11         * The comments in this file are taken from the JQuery UI site, so they do
12         * not always make sense with regard to QCubed. They are simply provided
13         * as reference. Note that this is very low-level code, and does not always
14         * update QCubed state variables. See the QSortableBase
15         * file, which contains code to interface between this generated file and QCubed.
16         *
17         * Because subsequent re-code generations will overwrite any changes to this
18         * file, you should leave this file unaltered to prevent yourself from losing
19         * any information or code changes.  All customizations should be done by
20         * overriding existing or implementing new methods, properties and variables
21         * in the QSortable class file.
22         *
23         */
24
25        /* Custom event classes for this control */
26       
27       
28        /**
29         * This event is triggered when sortable is created.
30         */
31        class QSortable_CreateEvent extends QJqUiEvent {
32                const EventName = 'sortcreate';
33        }
34        /**
35         * This event is triggered when sorting starts.
36         */
37        class QSortable_StartEvent extends QJqUiEvent {
38                const EventName = 'sortstart';
39        }
40        /**
41         * This event is triggered during sorting.
42         */
43        class QSortable_SortEvent extends QJqUiEvent {
44                const EventName = 'sort';
45        }
46        /**
47         * This event is triggered during sorting, but only when the DOM position has
48         *              changed.
49         */
50        class QSortable_ChangeEvent extends QJqUiEvent {
51                const EventName = 'sortchange';
52        }
53        /**
54         * This event is triggered when sorting stops, but when the placeholder/helper
55         *              is still available.
56         */
57        class QSortable_BeforeStopEvent extends QJqUiEvent {
58                const EventName = 'sortbeforestop';
59        }
60        /**
61         * This event is triggered when sorting has stopped.
62         */
63        class QSortable_StopEvent extends QJqUiEvent {
64                const EventName = 'sortstop';
65        }
66        /**
67         * This event is triggered when the user stopped sorting and the DOM position
68         *              has changed.
69         */
70        class QSortable_UpdateEvent extends QJqUiEvent {
71                const EventName = 'sortupdate';
72        }
73        /**
74         * This event is triggered when a connected sortable list has received an item
75         *              from another list.
76         */
77        class QSortable_ReceiveEvent extends QJqUiEvent {
78                const EventName = 'sortreceive';
79        }
80        /**
81         * This event is triggered when a sortable item has been dragged out from the
82         *              list and into another.
83         */
84        class QSortable_RemoveEvent extends QJqUiEvent {
85                const EventName = 'sortremove';
86        }
87        /**
88         * This event is triggered when a sortable item is moved into a connected
89         *              list.
90         */
91        class QSortable_OverEvent extends QJqUiEvent {
92                const EventName = 'sortover';
93        }
94        /**
95         * This event is triggered when a sortable item is moved away from a connected
96         *              list.
97         */
98        class QSortable_OutEvent extends QJqUiEvent {
99                const EventName = 'sortout';
100        }
101        /**
102         * This event is triggered when using connected lists, every connected list on
103         *              drag start receives it.
104         */
105        class QSortable_ActivateEvent extends QJqUiEvent {
106                const EventName = 'sortactivate';
107        }
108        /**
109         * This event is triggered when sorting was stopped, is propagated to all
110         *              possible connected lists.
111         */
112        class QSortable_DeactivateEvent extends QJqUiEvent {
113                const EventName = 'sortdeactivate';
114        }
115
116
117        /**
118         * @property boolean $Disabled Disables (true) or enables (false) the sortable. Can be set when
119         *              initialising (first creating) the sortable.
120         * @property string $AppendTo Defines where the helper that moves with the mouse is being appended to
121         *              during the drag (for example, to resolve overlap/zIndex issues).
122         * @property string $Axis If defined, the items can be dragged only horizontally or vertically.
123         *              Possible values:'x', 'y'.
124         * @property mixed $Cancel Prevents sorting if you start on elements matching the selector.
125         * @property mixed $ConnectWith Takes a jQuery selector with items that also have sortables applied. If
126         *              used, the sortable is now connected to the other one-way, so you can drag
127         *              from this sortable to the other.
128         * @property mixed $Containment Constrains dragging to within the bounds of the specified element - can be
129         *              a DOM element, 'parent', 'document', 'window', or a jQuery selector.
130         * Note:
131         *              the element specified for containment must have a calculated width and
132         *              height (though it need not be explicit), so for example, if you have
133         *              float:left sortable children and specify containment:'parent' be sure to
134         *              have float:left on the sortable/parent container as well or it will have
135         *              height: 0, causing undefined behavior.
136         * @property string $Cursor Defines the cursor that is being shown while sorting.
137         * @property mixed $CursorAt Moves the sorting element or helper so the cursor always appears to drag
138         *              from the same position. Coordinates can be given as a hash using a
139         *              combination of one or two keys: { top, left, right, bottom }.
140         * @property integer $Delay Time in milliseconds to define when the sorting should start. It helps
141         *              preventing unwanted drags when clicking on an element.
142         * @property integer $Distance Tolerance, in pixels, for when sorting should start. If specified, sorting
143         *              will not start until after mouse is dragged beyond distance. Can be used to
144         *              allow for clicks on elements within a handle.
145         * @property boolean $DropOnEmpty If false items from this sortable can't be dropped to an empty linked
146         *              sortable.
147         * @property boolean $ForceHelperSize If true, forces the helper to have a size.
148         * @property boolean $ForcePlaceholderSize If true, forces the placeholder to have a size.
149         * @property array $Grid Snaps the sorting element or helper to a grid, every x and y pixels. Array
150         *              values: [x, y]
151         * @property mixed $Handle Restricts sort start click to the specified element.
152         * @property mixed $Helper Allows for a helper element to be used for dragging display. The supplied
153         *              function receives the event and the element being sorted, and should return
154         *              a DOMElement to be used as a custom proxy helper. Possible values:
155         *              'original', 'clone'
156         * @property mixed $Items Specifies which items inside the element should be sortable.
157         * @property QJsClosure $Opacity Defines the opacity of the helper while sorting. From 0.01 to 1
158         * @property string $Placeholder Class that gets applied to the otherwise white space.
159         * @property QJsClosure $Revert If set to true, the item will be reverted to its new DOM position with a
160         *              smooth animation. Optionally, it can also be set to a number that controls
161         *              the duration of the animation in ms.
162         * @property boolean $Scroll If set to true, the page scrolls when coming to an edge.
163         * @property integer $ScrollSensitivity Defines how near the mouse must be to an edge to start scrolling.
164         * @property integer $ScrollSpeed The speed at which the window should scroll once the mouse pointer gets
165         *              within the scrollSensitivity distance.
166         * @property string $Tolerance This is the way the reordering behaves during drag. Possible values:
167         *              'intersect', 'pointer'. In some setups, 'pointer' is more
168         *              natural.
169         *
170         *
171         * intersect: draggable overlaps the droppable at least
172         *              50%
173         * pointer: mouse pointer overlaps the droppable
174         * @property integer $ZIndex Z-index for element/helper while being sorted.
175         */
176
177        class QSortableGen extends QPanel       {
178                protected $strJavaScripts = __JQUERY_EFFECTS__;
179                protected $strStyleSheets = __JQUERY_CSS__;
180                /** @var boolean */
181                protected $blnDisabled = null;
182                /** @var string */
183                protected $strAppendTo = null;
184                /** @var string */
185                protected $strAxis = null;
186                /** @var mixed */
187                protected $mixCancel = null;
188                /** @var mixed */
189                protected $mixConnectWith = null;
190                /** @var mixed */
191                protected $mixContainment = null;
192                /** @var string */
193                protected $strCursor = null;
194                /** @var mixed */
195                protected $mixCursorAt = null;
196                /** @var integer */
197                protected $intDelay;
198                /** @var integer */
199                protected $intDistance = null;
200                /** @var boolean */
201                protected $blnDropOnEmpty = null;
202                /** @var boolean */
203                protected $blnForceHelperSize = null;
204                /** @var boolean */
205                protected $blnForcePlaceholderSize = null;
206                /** @var array */
207                protected $arrGrid = null;
208                /** @var mixed */
209                protected $mixHandle = null;
210                /** @var mixed */
211                protected $mixHelper = null;
212                /** @var mixed */
213                protected $mixItems = null;
214                /** @var QJsClosure */
215                protected $mixOpacity = null;
216                /** @var string */
217                protected $strPlaceholder = null;
218                /** @var QJsClosure */
219                protected $mixRevert = null;
220                /** @var boolean */
221                protected $blnScroll = null;
222                /** @var integer */
223                protected $intScrollSensitivity = null;
224                /** @var integer */
225                protected $intScrollSpeed = null;
226                /** @var string */
227                protected $strTolerance = null;
228                /** @var integer */
229                protected $intZIndex = null;
230               
231                protected function makeJsProperty($strProp, $strKey) {
232                        $objValue = $this->$strProp;
233                        if (null === $objValue) {
234                                return '';
235                        }
236
237                        return $strKey . ': ' . JavaScriptHelper::toJsObject($objValue) . ', ';
238                }
239
240                protected function makeJqOptions() {
241                        $strJqOptions = '';
242                        $strJqOptions .= $this->makeJsProperty('Disabled', 'disabled');
243                        $strJqOptions .= $this->makeJsProperty('AppendTo', 'appendTo');
244                        $strJqOptions .= $this->makeJsProperty('Axis', 'axis');
245                        $strJqOptions .= $this->makeJsProperty('Cancel', 'cancel');
246                        $strJqOptions .= $this->makeJsProperty('ConnectWith', 'connectWith');
247                        $strJqOptions .= $this->makeJsProperty('Containment', 'containment');
248                        $strJqOptions .= $this->makeJsProperty('Cursor', 'cursor');
249                        $strJqOptions .= $this->makeJsProperty('CursorAt', 'cursorAt');
250                        $strJqOptions .= $this->makeJsProperty('Delay', 'delay');
251                        $strJqOptions .= $this->makeJsProperty('Distance', 'distance');
252                        $strJqOptions .= $this->makeJsProperty('DropOnEmpty', 'dropOnEmpty');
253                        $strJqOptions .= $this->makeJsProperty('ForceHelperSize', 'forceHelperSize');
254                        $strJqOptions .= $this->makeJsProperty('ForcePlaceholderSize', 'forcePlaceholderSize');
255                        $strJqOptions .= $this->makeJsProperty('Grid', 'grid');
256                        $strJqOptions .= $this->makeJsProperty('Handle', 'handle');
257                        $strJqOptions .= $this->makeJsProperty('Helper', 'helper');
258                        $strJqOptions .= $this->makeJsProperty('Items', 'items');
259                        $strJqOptions .= $this->makeJsProperty('Opacity', 'opacity');
260                        $strJqOptions .= $this->makeJsProperty('Placeholder', 'placeholder');
261                        $strJqOptions .= $this->makeJsProperty('Revert', 'revert');
262                        $strJqOptions .= $this->makeJsProperty('Scroll', 'scroll');
263                        $strJqOptions .= $this->makeJsProperty('ScrollSensitivity', 'scrollSensitivity');
264                        $strJqOptions .= $this->makeJsProperty('ScrollSpeed', 'scrollSpeed');
265                        $strJqOptions .= $this->makeJsProperty('Tolerance', 'tolerance');
266                        $strJqOptions .= $this->makeJsProperty('ZIndex', 'zIndex');
267                        if ($strJqOptions) $strJqOptions = substr($strJqOptions, 0, -2);
268                        return $strJqOptions;
269                }
270
271                public function getJqControlId() {
272                        return $this->ControlId;
273                }
274
275                public function GetControlJavaScript() {
276                        return sprintf('jQuery("#%s").sortable({%s})', $this->getJqControlId(), $this->makeJqOptions());
277                }
278
279                public function GetEndScript() {
280                        return  $this->GetControlJavaScript() . '; ' . parent::GetEndScript();
281                }
282               
283                /**
284                 * Call a JQuery UI Method on the object. Takes variable number of arguments.
285                 *
286                 * @param string $strMethodName the method name to call
287                 * @internal param $mixed [optional] $mixParam1
288                 * @internal param $mixed [optional] $mixParam2
289                 */
290                protected function CallJqUiMethod($strMethodName /*, ... */) {
291                        $args = array();
292                        $args = func_get_args();
293
294                        $strArgs = JavaScriptHelper::toJsObject($args);
295                        $strJs = sprintf('jQuery("#%s").sortable(%s)', 
296                                $this->getJqControlId(),
297                                substr($strArgs, 1, strlen($strArgs)-2));       // params without brackets
298                        QApplication::ExecuteJavaScript($strJs);
299                }
300
301
302                /**
303                 * Remove the sortable functionality completely. This will return the element
304                 * back to its pre-init state.
305                 */
306                public function Destroy() {
307                        $this->CallJqUiMethod("destroy");
308                }
309                /**
310                 * Disable the sortable.
311                 */
312                public function Disable() {
313                        $this->CallJqUiMethod("disable");
314                }
315                /**
316                 * Enable the sortable.
317                 */
318                public function Enable() {
319                        $this->CallJqUiMethod("enable");
320                }
321                /**
322                 * Get or set any sortable option. If no value is specified, will act as a
323                 * getter.
324                 * @param $optionName
325                 * @param $value
326                 */
327                public function Option($optionName, $value = null) {
328                        $this->CallJqUiMethod("option", $optionName, $value);
329                }
330                /**
331                 * Set multiple sortable options at once by providing an options object.
332                 * @param $options
333                 */
334                public function Option1($options) {
335                        $this->CallJqUiMethod("option", $options);
336                }
337                /**
338                 * Serializes the sortable's item id's into a form/ajax submittable string.
339                 * Calling this method produces a hash that can be appended to any url to
340                 * easily submit a new item order back to the server.
341                 * It works by default by looking at the id of each item in the format
342                 * 'setname_number', and it spits out a hash like
343                 * "setname[]=number&amp;setname[]=number".
344                 * You can also give in a option hash as second argument to custom define how
345                 * the function works. The possible options are: 'key' (replaces part1[] with
346                 * whatever you want), 'attribute' (test another attribute than 'id') and
347                 * 'expression' (use your own regexp).
348                 * If serialize returns an empty string, make sure the id attributes include
349                 * an underscore.  They must be in the form: "set_number" For example, a 3
350                 * element list with id attributes foo_1, foo_5, foo_2 will serialize to
351                 * foo[]=1&amp;foo[]=5&amp;foo[]=2. You can use an underscore, equal sign or
352                 * hyphen to separate the set and number.  For example foo=1 or foo-1 or foo_1
353                 * all serialize to foo[]=1.
354                 * @param $options
355                 */
356                public function Serialize($options = null) {
357                        $this->CallJqUiMethod("serialize", $options);
358                }
359                /**
360                 * Serializes the sortable's item id's into an array of string. If you have
361                 *
362                 *
363                 * &lt;ul id=&quot;a_sortable&quot;&gt;&lt;br&gt;
364                 * &lt;li id=&quot;hello&quot;&gt;Hello&lt;/li&gt;&lt;br&gt;
365                 * &lt;li id=&quot;goodbye&quot;&gt;Good bye&lt;/li&gt;&lt;br&gt;
366                 * &lt;/ul&gt;
367                 *
368                 * and do
369                 *
370                 * var result = $('#a_sortable').sortable('toArray');
371                 * then
372                 *
373                 * result[0] will contain &quot;hello&quot; and result[1] will contain
374                 * &quot;goodbye&quot;.</p>
375                 */
376                public function ToArray() {
377                        $this->CallJqUiMethod("toArray");
378                }
379                /**
380                 * Refresh the sortable items. Custom trigger the reloading of all sortable
381                 * items, causing new items to be recognized.
382                 */
383                public function Refresh() {
384                        $this->CallJqUiMethod("refresh");
385                }
386                /**
387                 * Refresh the cached positions of the sortables' items. Calling this method
388                 * refreshes the cached item positions of all sortables. This is usually done
389                 * automatically by the script and slows down performance. Use wisely.
390                 */
391                public function RefreshPositions() {
392                        $this->CallJqUiMethod("refreshPositions");
393                }
394                /**
395                 * Cancels a change in the current sortable and reverts it back to how it was
396                 * before the current sort started. Useful in the stop and receive callback
397                 * functions.
398                 * If the sortable item is not being moved from one connected sortable to
399                 * another:
400                 *
401                 * $(this).sortable('cancel');
402                 * will cancel the change.
403                 * If the sortable item is being moved from one connected sortable to another:
404                 *
405                 * $(ui.sender).sortable('cancel');
406                 * will cancel the change. Useful in the 'receive' callback.
407                 */
408                public function Cancel() {
409                        $this->CallJqUiMethod("cancel");
410                }
411
412
413                public function __get($strName) {
414                        switch ($strName) {
415                                case 'Disabled': return $this->blnDisabled;
416                                case 'AppendTo': return $this->strAppendTo;
417                                case 'Axis': return $this->strAxis;
418                                case 'Cancel': return $this->mixCancel;
419                                case 'ConnectWith': return $this->mixConnectWith;
420                                case 'Containment': return $this->mixContainment;
421                                case 'Cursor': return $this->strCursor;
422                                case 'CursorAt': return $this->mixCursorAt;
423                                case 'Delay': return $this->intDelay;
424                                case 'Distance': return $this->intDistance;
425                                case 'DropOnEmpty': return $this->blnDropOnEmpty;
426                                case 'ForceHelperSize': return $this->blnForceHelperSize;
427                                case 'ForcePlaceholderSize': return $this->blnForcePlaceholderSize;
428                                case 'Grid': return $this->arrGrid;
429                                case 'Handle': return $this->mixHandle;
430                                case 'Helper': return $this->mixHelper;
431                                case 'Items': return $this->mixItems;
432                                case 'Opacity': return $this->mixOpacity;
433                                case 'Placeholder': return $this->strPlaceholder;
434                                case 'Revert': return $this->mixRevert;
435                                case 'Scroll': return $this->blnScroll;
436                                case 'ScrollSensitivity': return $this->intScrollSensitivity;
437                                case 'ScrollSpeed': return $this->intScrollSpeed;
438                                case 'Tolerance': return $this->strTolerance;
439                                case 'ZIndex': return $this->intZIndex;
440                                default: 
441                                        try { 
442                                                return parent::__get($strName); 
443                                        } catch (QCallerException $objExc) { 
444                                                $objExc->IncrementOffset(); 
445                                                throw $objExc; 
446                                        }
447                        }
448                }
449
450                public function __set($strName, $mixValue) {
451                        $this->blnModified = true;
452
453                        switch ($strName) {
454                                case 'Disabled':
455                                        try {
456                                                $this->blnDisabled = QType::Cast($mixValue, QType::Boolean);
457                                                if ($this->Rendered) {
458                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
459                                                }
460                                                break;
461                                        } catch (QInvalidCastException $objExc) {
462                                                $objExc->IncrementOffset();
463                                                throw $objExc;
464                                        }
465
466                                case 'AppendTo':
467                                        try {
468                                                $this->strAppendTo = QType::Cast($mixValue, QType::String);
469                                                if ($this->Rendered) {
470                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
471                                                }
472                                                break;
473                                        } catch (QInvalidCastException $objExc) {
474                                                $objExc->IncrementOffset();
475                                                throw $objExc;
476                                        }
477
478                                case 'Axis':
479                                        try {
480                                                $this->strAxis = QType::Cast($mixValue, QType::String);
481                                                if ($this->Rendered) {
482                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
483                                                }
484                                                break;
485                                        } catch (QInvalidCastException $objExc) {
486                                                $objExc->IncrementOffset();
487                                                throw $objExc;
488                                        }
489
490                                case 'Cancel':
491                                        $this->mixCancel = $mixValue;
492                               
493                                        if ($this->Rendered) {
494                                                $this->CallJqUiMethod("option", $strName, $mixValue);
495                                        }
496                                        break;
497
498                                case 'ConnectWith':
499                                        $this->mixConnectWith = $mixValue;
500                               
501                                        if ($this->Rendered) {
502                                                $this->CallJqUiMethod("option", $strName, $mixValue);
503                                        }
504                                        break;
505
506                                case 'Containment':
507                                        $this->mixContainment = $mixValue;
508                               
509                                        if ($this->Rendered) {
510                                                $this->CallJqUiMethod("option", $strName, $mixValue);
511                                        }
512                                        break;
513
514                                case 'Cursor':
515                                        try {
516                                                $this->strCursor = QType::Cast($mixValue, QType::String);
517                                                if ($this->Rendered) {
518                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
519                                                }
520                                                break;
521                                        } catch (QInvalidCastException $objExc) {
522                                                $objExc->IncrementOffset();
523                                                throw $objExc;
524                                        }
525
526                                case 'CursorAt':
527                                        $this->mixCursorAt = $mixValue;
528                               
529                                        if ($this->Rendered) {
530                                                $this->CallJqUiMethod("option", $strName, $mixValue);
531                                        }
532                                        break;
533
534                                case 'Delay':
535                                        try {
536                                                $this->intDelay = QType::Cast($mixValue, QType::Integer);
537                                                if ($this->Rendered) {
538                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
539                                                }
540                                                break;
541                                        } catch (QInvalidCastException $objExc) {
542                                                $objExc->IncrementOffset();
543                                                throw $objExc;
544                                        }
545
546                                case 'Distance':
547                                        try {
548                                                $this->intDistance = QType::Cast($mixValue, QType::Integer);
549                                                if ($this->Rendered) {
550                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
551                                                }
552                                                break;
553                                        } catch (QInvalidCastException $objExc) {
554                                                $objExc->IncrementOffset();
555                                                throw $objExc;
556                                        }
557
558                                case 'DropOnEmpty':
559                                        try {
560                                                $this->blnDropOnEmpty = QType::Cast($mixValue, QType::Boolean);
561                                                if ($this->Rendered) {
562                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
563                                                }
564                                                break;
565                                        } catch (QInvalidCastException $objExc) {
566                                                $objExc->IncrementOffset();
567                                                throw $objExc;
568                                        }
569
570                                case 'ForceHelperSize':
571                                        try {
572                                                $this->blnForceHelperSize = QType::Cast($mixValue, QType::Boolean);
573                                                if ($this->Rendered) {
574                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
575                                                }
576                                                break;
577                                        } catch (QInvalidCastException $objExc) {
578                                                $objExc->IncrementOffset();
579                                                throw $objExc;
580                                        }
581
582                                case 'ForcePlaceholderSize':
583                                        try {
584                                                $this->blnForcePlaceholderSize = QType::Cast($mixValue, QType::Boolean);
585                                                if ($this->Rendered) {
586                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
587                                                }
588                                                break;
589                                        } catch (QInvalidCastException $objExc) {
590                                                $objExc->IncrementOffset();
591                                                throw $objExc;
592                                        }
593
594                                case 'Grid':
595                                        try {
596                                                $this->arrGrid = QType::Cast($mixValue, QType::ArrayType);
597                                                if ($this->Rendered) {
598                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
599                                                }
600                                                break;
601                                        } catch (QInvalidCastException $objExc) {
602                                                $objExc->IncrementOffset();
603                                                throw $objExc;
604                                        }
605
606                                case 'Handle':
607                                        $this->mixHandle = $mixValue;
608                               
609                                        if ($this->Rendered) {
610                                                $this->CallJqUiMethod("option", $strName, $mixValue);
611                                        }
612                                        break;
613
614                                case 'Helper':
615                                        $this->mixHelper = $mixValue;
616                               
617                                        if ($this->Rendered) {
618                                                $this->CallJqUiMethod("option", $strName, $mixValue);
619                                        }
620                                        break;
621
622                                case 'Items':
623                                        $this->mixItems = $mixValue;
624                               
625                                        if ($this->Rendered) {
626                                                $this->CallJqUiMethod("option", $strName, $mixValue);
627                                        }
628                                        break;
629
630                                case 'Opacity':
631                                        try {
632                                                $this->mixOpacity = QType::Cast($mixValue, 'QJsClosure');
633                                                if ($this->Rendered) {
634                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
635                                                }
636                                                break;
637                                        } catch (QInvalidCastException $objExc) {
638                                                $objExc->IncrementOffset();
639                                                throw $objExc;
640                                        }
641
642                                case 'Placeholder':
643                                        try {
644                                                $this->strPlaceholder = QType::Cast($mixValue, QType::String);
645                                                if ($this->Rendered) {
646                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
647                                                }
648                                                break;
649                                        } catch (QInvalidCastException $objExc) {
650                                                $objExc->IncrementOffset();
651                                                throw $objExc;
652                                        }
653
654                                case 'Revert':
655                                        try {
656                                                $this->mixRevert = QType::Cast($mixValue, 'QJsClosure');
657                                                if ($this->Rendered) {
658                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
659                                                }
660                                                break;
661                                        } catch (QInvalidCastException $objExc) {
662                                                $objExc->IncrementOffset();
663                                                throw $objExc;
664                                        }
665
666                                case 'Scroll':
667                                        try {
668                                                $this->blnScroll = QType::Cast($mixValue, QType::Boolean);
669                                                if ($this->Rendered) {
670                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
671                                                }
672                                                break;
673                                        } catch (QInvalidCastException $objExc) {
674                                                $objExc->IncrementOffset();
675                                                throw $objExc;
676                                        }
677
678                                case 'ScrollSensitivity':
679                                        try {
680                                                $this->intScrollSensitivity = QType::Cast($mixValue, QType::Integer);
681                                                if ($this->Rendered) {
682                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
683                                                }
684                                                break;
685                                        } catch (QInvalidCastException $objExc) {
686                                                $objExc->IncrementOffset();
687                                                throw $objExc;
688                                        }
689
690                                case 'ScrollSpeed':
691                                        try {
692                                                $this->intScrollSpeed = QType::Cast($mixValue, QType::Integer);
693                                                if ($this->Rendered) {
694                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
695                                                }
696                                                break;
697                                        } catch (QInvalidCastException $objExc) {
698                                                $objExc->IncrementOffset();
699                                                throw $objExc;
700                                        }
701
702                                case 'Tolerance':
703                                        try {
704                                                $this->strTolerance = QType::Cast($mixValue, QType::String);
705                                                if ($this->Rendered) {
706                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
707                                                }
708                                                break;
709                                        } catch (QInvalidCastException $objExc) {
710                                                $objExc->IncrementOffset();
711                                                throw $objExc;
712                                        }
713
714                                case 'ZIndex':
715                                        try {
716                                                $this->intZIndex = QType::Cast($mixValue, QType::Integer);
717                                                if ($this->Rendered) {
718                                                        $this->CallJqUiMethod("option", $strName, $mixValue);
719                                                }
720                                                break;
721                                        } catch (QInvalidCastException $objExc) {
722                                                $objExc->IncrementOffset();
723                                                throw $objExc;
724                                        }
725
726
727                                case 'Enabled':
728                                        $this->Disabled = !$mixValue;   // Tie in standard QCubed functionality
729                                        parent::__set($strName, $mixValue);
730                                        break;
731                                       
732                                default:
733                                        try {
734                                                parent::__set($strName, $mixValue);
735                                                break;
736                                        } catch (QCallerException $objExc) {
737                                                $objExc->IncrementOffset();
738                                                throw $objExc;
739                                        }
740                        }
741                }
742        }
743
744?>
Note: See TracBrowser for help on using the browser.