svn commit: samba r21286 - in
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table:
.
derrell at samba.org
derrell at samba.org
Sun Feb 11 21:54:14 GMT 2007
Author: derrell
Date: 2007-02-11 21:54:14 +0000 (Sun, 11 Feb 2007)
New Revision: 21286
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21286
Log:
Tree column now resizes wiith splitter adjustment, but scrollbars don't yet update properly
Modified:
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/AbstractResizeBehavior.js
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/DefaultResizeBehavior.js
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/ResizeTableColumnModel.js
branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/Table.js
Changeset:
Modified: branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/AbstractResizeBehavior.js
===================================================================
--- branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/AbstractResizeBehavior.js 2007-02-11 20:22:45 UTC (rev 21285)
+++ branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/AbstractResizeBehavior.js 2007-02-11 21:54:14 UTC (rev 21286)
@@ -71,7 +71,8 @@
/**
- * Called when the window is resized.
+ * Called when the table width changes due to either a window size change
+ * or a parent object changing size causing the table to change size.
*
* @param tableColumnModel {qx.ui.table.ResizeTableColumnModel}
* The table column model in use. Of particular interest is the property
@@ -80,11 +81,11 @@
* of columns.
*
* @param event
- * The <i>onwindowresize</i> event object.
+ * The <i>ontablewidthchanged</i> event object.
*/
-qx.Proto.onWindowResize = function(tableColumnModel, event)
+qx.Proto.onTableWidthChanged = function(tableColumnModel, event)
{
- throw new Error("onWindowResize is abstract");
+ throw new Error("onTableWidthChanged is abstract");
};
Modified: branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/DefaultResizeBehavior.js
===================================================================
--- branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/DefaultResizeBehavior.js 2007-02-11 20:22:45 UTC (rev 21285)
+++ branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/DefaultResizeBehavior.js 2007-02-11 21:54:14 UTC (rev 21286)
@@ -198,7 +198,7 @@
// overloaded
-qx.Proto.onWindowResize = function(tableColumnModel, event)
+qx.Proto.onTableWidthChanged = function(tableColumnModel, event)
{
// Calculate column widths
this._computeColumnsFlexWidth(tableColumnModel, event);
Modified: branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/ResizeTableColumnModel.js
===================================================================
--- branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/ResizeTableColumnModel.js 2007-02-11 20:22:45 UTC (rev 21285)
+++ branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/ResizeTableColumnModel.js 2007-02-11 21:54:14 UTC (rev 21286)
@@ -21,6 +21,7 @@
#module(table)
#require(qx.ui.table.DefaultResizeBehavior)
+#embed(qx.icontheme/16/actions/view-refresh.png)
************************************************************************ */
@@ -50,7 +51,7 @@
* The behavior to use.
*
* The provided behavior must extend {link @AbstractResizeBehavior} and
- * implement the <i>onAppear</i>, <i>onWindowResize</i>,
+ * implement the <i>onAppear</i>, <i>onTableWidthChanged</i>,
* <i>onColumnWidthChanged</i> and <i>onVisibilityChanged</i>methods.
*/
qx.OO.addProperty(
@@ -90,9 +91,8 @@
// We'll do our column resizing when the table appears, ...
table.addEventListener("appear", this._onappear, this);
- // ... when the window is resized, ...
- var d = qx.ui.core.ClientDocument.getInstance();
- d.addEventListener("windowresize", this._onwindowresize, this);
+ // ... when the inner width of the table changes, ...
+ table.addEventListener("tableWidthChanged", this._ontablewidthchanged, this);
// ... when columns are resized, ...
this.addEventListener("widthChanged", this._oncolumnwidthchanged, this);
@@ -138,7 +138,7 @@
};
/**
- * Event handler for the "onappear" event.
+ * Event handler for the "appear" event.
*
* @param event {qx.event.type.Event}
* The "onappear" event object.
@@ -162,12 +162,12 @@
/**
- * Event handler for the "onwindowresize" event.
+ * Event handler for the "tableWidthChanged" event.
*
* @param event {qx.event.type.Event}
* The "onwidowresize" event object.
*/
-qx.Proto._onwindowresize = function(event)
+qx.Proto._ontablewidthchanged = function(event)
{
// Is this a recursive call or has the table not yet been rendered?
if (this._bInProgress || ! this._bAppeared)
@@ -177,17 +177,17 @@
}
this._bInProgress = true;
- this.debug("onwindowresize");
- this.getBehavior().onWindowResize(this, event);
+ this.debug("ontablewidthchanged");
+ this.getBehavior().onTableWidthChanged(this, event);
this._bInProgress = false;
};
/**
- * Event handler for the "oncolumnwidthchanged" event.
+ * Event handler for the "widthChanged" event.
*
* @param event {qx.event.type.DataEvent}
- * The "oncolumnwidthchanged" event object.
+ * The "widthChanged" event object.
*/
qx.Proto._oncolumnwidthchanged = function(event)
{
@@ -206,10 +206,10 @@
/**
- * Event handler for the "onvisibilitychangned" event.
+ * Event handler for the "visibilityChanged" event.
*
* @param event {qx.event.type.DataEvent}
- * The "onvisibilitychanged" event object.
+ * The "visibilityChanged" event object.
*/
qx.Proto._onvisibilitychanged = function(event)
{
Modified: branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/Table.js
===================================================================
--- branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/Table.js 2007-02-11 20:22:45 UTC (rev 21285)
+++ branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/table/Table.js 2007-02-11 21:54:14 UTC (rev 21286)
@@ -42,6 +42,9 @@
* The event data is a map with two properties: table and menu. Listeners
* may add additional items to the menu, which appear at the bottom of the
* menu.
+ *
+ * @event tableWidthChanged {qx.event.type.Event}
+ * Dispatched when the inner width of the table has changed.
*/
qx.OO.defineClass("qx.ui.table.Table", qx.ui.layout.VerticalBoxLayout,
function(tableModel) {
@@ -1207,6 +1210,8 @@
qx.Proto._changeInnerWidth = function(newValue, oldValue) {
var self = this;
window.setTimeout(function() {
+ self.createDispatchEvent("tableWidthChanged");
+ self._updateScrollerWidths();
self._updateScrollBarVisibility();
qx.ui.core.Widget.flushGlobalQueues();
}, 0);
More information about the samba-cvs
mailing list