summaryrefslogtreecommitdiff
path: root/swat2/style/qooxdoo/widgets/managers/QxManager.js
blob: 6fd02f7f6a4164b946a9ab743f1339692ccd07fe (plain)
1
2
/* Copyright (c): 2002-2005 (Germany): United Internet, 1&1, GMX, Schlund+Partner, Alturo */
function QxManager(){QxTarget.call(this);this._objects={};};QxManager.extend(QxTarget,"QxManager");proto.add=function(oObject){var h=oObject.toHash();if(this._objects[h]){this.debug("Already known:"+oObject);return false;};this._objects[h]=oObject;return true;};proto.remove=function(oObject){delete this._objects[oObject.toHash()];return true;};proto.has=function(oObject){return this._objects[oObject.toHash()]!=null;};proto.get=function(oObject){return this._objects[oObject.toHash()];};proto.dispose=function(){if(this.getDisposed()){return;};if(typeof this._objects!="undefined"){for(var i in this._objects){if(typeof this._objects[i]=="object")this._objects[i].dispose();delete this._objects[i];};delete this._objects;};QxTarget.prototype.dispose.call(this);};