rename swat => swat2, so that we don't conflict with samba3
[metze/samba/wip.git] / swat2 / style / qooxdoo / widgets / core / QxSelectionStorage.js
diff --git a/swat2/style/qooxdoo/widgets/core/QxSelectionStorage.js b/swat2/style/qooxdoo/widgets/core/QxSelectionStorage.js
new file mode 100644 (file)
index 0000000..07b6aeb
--- /dev/null
@@ -0,0 +1,2 @@
+/* Copyright (c): 2002-2005 (Germany): United Internet, 1&1, GMX, Schlund+Partner, Alturo */
+function QxSelectionStorage(){this.removeAll();};QxSelectionStorage.extend(QxObject,"QxSelectionStorage");proto.add=function(oItem){this._i4[this.getItemHashCode(oItem)]=oItem;};proto.remove=function(oItem){delete this._i4[this.getItemHashCode(oItem)];};proto.removeAll=function(){this._i4={};};proto.contains=function(oItem){return this.getItemHashCode(oItem)in this._i4;};proto.toArray=function(){var res=[];for(var key in this._i4){res.push(this._i4[key]);};return res;};proto.getFirst=function(){for(var key in this._i4){return this._i4[key];};};proto.getChangeValue=function(){var sb=[];for(var hc in this._i4){sb.push(hc);};sb.sort();return sb.join(",");};proto.getItemHashCode=function(oItem){return oItem.toHash();};proto.isEmpty=function(){return isHashEmpty(this._i4);};proto.dispose=function(){if(this.getDisposed()){return;};this._i4=null;QxObject.prototype.dispose.call(this);};
\ No newline at end of file