diff options
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/font/FontObject.js')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/font/FontObject.js | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/font/FontObject.js b/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/font/FontObject.js new file mode 100644 index 0000000000..d9ff4bbbe5 --- /dev/null +++ b/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/renderer/font/FontObject.js @@ -0,0 +1,95 @@ +/* ************************************************************************ + + 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_basic) + +************************************************************************ */ + +qx.OO.defineClass("qx.renderer.font.FontObject", qx.renderer.font.Font, +function(vSize, vName) +{ + this._dependentObjects = {}; + + qx.renderer.font.Font.call(this, vSize, vName); +}); + + + + +/* +--------------------------------------------------------------------------- + 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._updateFont(vEdge); + } + } +} + + + + + + + +/* +--------------------------------------------------------------------------- + DISPOSER +--------------------------------------------------------------------------- +*/ + +qx.Proto.dispose = function() +{ + if (this.getDisposed()) { + return; + } + + if (typeof this._dependentObjects === "object") + { + for (vKey in this._dependentObjects) { + delete this._dependentObjects[vKey]; + } + + delete this._dependentObjects; + } + + return qx.renderer.font.Font.prototype.dispose.call(this); +} |