diff options
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/IconHeaderCellRenderer.js')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/IconHeaderCellRenderer.js | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/IconHeaderCellRenderer.js b/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/IconHeaderCellRenderer.js deleted file mode 100644 index fd646e882c..0000000000 --- a/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/IconHeaderCellRenderer.js +++ /dev/null @@ -1,86 +0,0 @@ -/* ************************************************************************ - - qooxdoo - the new era of web development - - http://qooxdoo.org - - Copyright: - 2006 STZ-IDA, Germany, http://www.stz-ida.de - - 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: - * Til Schneider (til132) - * Carsten Lergenmueller (carstenl) - -************************************************************************ */ - -/* ************************************************************************ - -#module(ui_table) - -************************************************************************ */ - -/** - * A header cell renderer which renders an icon (only). The icon cannot be combined - * with text. - * - * @param iconUrl {String} URL to the icon to show - * @param tooltip {String ? ""} Text of the tooltip to show if the mouse hovers over the - * icon - * - */ -qx.OO.defineClass("qx.ui.table.IconHeaderCellRenderer", qx.ui.table.DefaultHeaderCellRenderer, -function(iconUrl, tooltip) { - qx.ui.table.DefaultHeaderCellRenderer.call(this); - if (iconUrl == null){ - iconUrl = ""; - } - this.setIconUrl(iconUrl); - this.setToolTip(tooltip); -}); - -/** - * URL of the icon to show - */ -qx.OO.addProperty({ name:"iconUrl", type:"string", defaultValue:"", allowNull:false }); - -/** - * ToolTip to show if the mouse hovers of the icon - */ -qx.OO.addProperty({ name:"toolTip", type:"string", defaultValue:null, allowNull:true }); - -// overridden -qx.Proto.updateHeaderCell = function(cellInfo, cellWidget) { - qx.ui.table.DefaultHeaderCellRenderer.prototype.updateHeaderCell.call(this, cellInfo, cellWidget); - - // Set URL to icon - var img = cellWidget.getUserData("qx_ui_table_IconHeaderCellRenderer_icon"); - if (img == null){ - img = new qx.ui.basic.Image(); - cellWidget.setUserData("qx_ui_table_IconHeaderCellRenderer_icon", img); - cellWidget.addAtBegin(img); - } - img.setSource(this.getIconUrl()); - - // Set image tooltip if given - var widgetToolTip = cellWidget.getToolTip(); - if (this.getToolTip() != null){ - - //Create tooltip if necessary - if (true || widgetToolTip == null ){ - widgetToolTip = new qx.ui.popup.ToolTip(this.getToolTip()); - cellWidget.setToolTip(widgetToolTip); - //this.debug("Creating tooltip"); - } - - //Set tooltip text - widgetToolTip.getAtom().setLabel(this.getToolTip()); - //this.debug("Setting tooltip text " + this.getToolTip()); - } - -} - |