summaryrefslogtreecommitdiff
path: root/swat2/style/qooxdoo/widgets/core/QxTimer.js
diff options
context:
space:
mode:
Diffstat (limited to 'swat2/style/qooxdoo/widgets/core/QxTimer.js')
-rw-r--r--swat2/style/qooxdoo/widgets/core/QxTimer.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/swat2/style/qooxdoo/widgets/core/QxTimer.js b/swat2/style/qooxdoo/widgets/core/QxTimer.js
new file mode 100644
index 00000000000..6d0794237af
--- /dev/null
+++ b/swat2/style/qooxdoo/widgets/core/QxTimer.js
@@ -0,0 +1,2 @@
+/* Copyright (c): 2002-2005 (Germany): United Internet, 1&1, GMX, Schlund+Partner, Alturo */
+function QxTimer(vInterval){QxTarget.call(this);this.setEnabled(false);if(isValidNumber(vInterval)){this.setInterval(vInterval);};(new QxTimerManager).add(this);var o=this;this.__i7=function(){o._i7();};};QxTimer.extend(QxTarget,"QxTimer");QxTimer.addProperty({name:"interval",type:Number,defaultValue:1000});proto._i8=null;proto._modifyEnabled=function(_b1,_b2,_b3,_b4){if(_b2){window.clearInterval(this._i8);this._i8=null;}else if(_b1){this._i8=window.setInterval(this.__i7,this.getInterval());};return QxTarget.prototype._modifyEnabled.call(this,_b1,_b2,_b3,_b4);};proto.start=function(){this.setEnabled(true);};proto.startWith=function(vInterval){this.setInterval(vInterval);this.start();};proto.stop=function(){this.setEnabled(false);};proto.restart=function(){this.stop();this.start();};proto.restartWith=function(vInterval){this.stop();this.startWith(vInterval);};proto._i7=function(){if(this.getEnabled()&&this.hasEventListeners("interval")){this.dispatchEvent(new QxEvent("interval"),true);};};proto.dispose=function(){if(this.getDisposed()){return;};this.stop();this.__i7=null;if(this._i8r){window.clearInterval(this._i8);this._i8r=null;};return QxTarget.prototype.dispose.call(this);}; \ No newline at end of file