diff options
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/border/BorderObject.js')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/border/BorderObject.js | 151 |
1 files changed, 0 insertions, 151 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/border/BorderObject.js b/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/border/BorderObject.js deleted file mode 100644 index 89a963cf41..0000000000 --- a/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/border/BorderObject.js +++ /dev/null @@ -1,151 +0,0 @@ -/* ************************************************************************ - - qooxdoo - the new era of web development - - http://qooxdoo.org - - Copyright: - 2004-2007 1&1 Internet AG, Germany, http://www.1and1.org - - License: - LGPL: http://www.gnu.org/licenses/lgpl.html - EPL: http://www.eclipse.org/org/documents/epl-v10.php - See the LICENSE file in the project's top-level directory for details. - - Authors: - * Sebastian Werner (wpbasti) - * Andreas Ecker (ecker) - -************************************************************************ */ - -/* ************************************************************************ - -#module(ui_core) - -************************************************************************ */ - -qx.OO.defineClass("qx.renderer.border.BorderObject", qx.renderer.border.Border, -function(vWidth, vStyle, vColor) -{ - this._dependentObjects = {}; - - qx.renderer.border.Border.call(this, vWidth, vStyle, vColor); -}); - - - -/* ---------------------------------------------------------------------------- - UTILITY ---------------------------------------------------------------------------- -*/ - -qx.renderer.border.BorderObject.fromString = function(vDefString) -{ - var vBorder = new qx.renderer.border.BorderObject; - var vAllParts = vDefString.split(/\s+/); - var vPart, vTemp; - - for (var i=0; i<vAllParts.length; i++) - { - vPart = vAllParts[i]; - - switch(vPart) - { - case "groove": - case "ridge": - case "inset": - case "outset": - case "solid": - case "dotted": - case "dashed": - case "double": - case "none": - vBorder.setStyle(vPart); - break; - - default: - vTemp = parseFloat(vPart); - - if(vTemp == vPart || qx.lang.String.contains(vPart, "px")) - { - vBorder.setWidth(vTemp); - } - else - { - vPart = vPart.toLowerCase(); - vBorder.setColor(qx.renderer.color.Color.themedNames[vPart] ? new qx.renderer.color.ColorObject(vPart) : new qx.renderer.color.Color(vPart)); - } - - break; - } - } - - return vBorder; -} - - - - - - -/* ---------------------------------------------------------------------------- - WIDGET CONNECTION ---------------------------------------------------------------------------- -*/ - -qx.Proto.addListenerWidget = function(o) { - this._dependentObjects[o.toHashCode()] = o; -} - -qx.Proto.removeListenerWidget = function(o) { - delete this._dependentObjects[o.toHashCode()]; -} - -qx.Proto._sync = function(vEdge) -{ - var vAll = this._dependentObjects; - var vCurrent; - - for (vKey in vAll) - { - vCurrent = vAll[vKey]; - - if (vCurrent.isCreated()) { - vCurrent._updateBorder(vEdge); - } - } -} - - - - - - - -/* ---------------------------------------------------------------------------- - DISPOSER ---------------------------------------------------------------------------- -*/ - -qx.Proto.dispose = function() -{ - if (this.getDisposed()) { - return; - } - - if (typeof this._dependentObjects === "object") - { - var vAll = this._dependentObjects; - for (vKey in vAll) { - delete vAll[vKey]; - } - - vAll = null; - delete this._dependentObjects; - } - - return qx.renderer.border.Border.prototype.dispose.call(this); -} |