Re: [qooxdoo-commit] SF.net SVN: qooxdoo:[14884] trunk/qooxdoo/frontend/framework/source/class/ qx/ui/table

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [qooxdoo-commit] SF.net SVN: qooxdoo:[14884] trunk/qooxdoo/frontend/framework/source/class/ qx/ui/table

Derrell Lipman
Hi Fabian,

Be careful about where you put this stuff from ui.util.column.  I had split it out from Table because it is useful for other classes.  In particular, it's currently also used by Progressive's table.

Cheers,

Derrell


On Mon, Jul 28, 2008 at 8:21 AM, <[hidden email]> wrote:
Revision: 14884
         http://qooxdoo.svn.sourceforge.net/qooxdoo/?rev=14884&view=rev
Author:   fjakobs
Date:     2008-07-28 12:21:36 +0000 (Mon, 28 Jul 2008)

Log Message:
-----------
[BUG NEW 868]: Port table widget
http://bugzilla.qooxdoo.org/show_bug.cgi?id=868

rename util to util2 to port the resize behaviour

Modified Paths:
--------------
   trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/Data.js
   trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/FlexWidth.js
   trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/Widths.js

Added Paths:
-----------
   trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/

Removed Paths:
-------------
   trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util/

Modified: trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/Data.js
===================================================================
--- trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util/Data.js      2008-07-24 13:15:09 UTC (rev 14795)
+++ trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/Data.js     2008-07-28 12:21:36 UTC (rev 14884)
@@ -25,11 +25,11 @@

 /**
 * All of the resizing information about a column.  This is the class which
- * {@link qx.ui.table.util.Widths} contains in its array of column data.
+ * {@link qx.ui.table.util2.Widths} contains in its array of column data.
 */
-qx.Class.define("qx.ui.table.util.Data",
+qx.Class.define("qx.ui.table.util2.Data",
 {
-  extend : qx.ui.core.Widget,
+  extend : qx.legacy.ui.core.Widget,


  construct : function()

Modified: trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/FlexWidth.js
===================================================================
--- trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util/FlexWidth.js 2008-07-24 13:15:09 UTC (rev 14795)
+++ trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/FlexWidth.js        2008-07-28 12:21:36 UTC (rev 14884)
@@ -27,7 +27,7 @@
 * Utility functions for calculating column widths based on Flex Width
 * settings.
 */
-qx.Class.define("qx.ui.table.util.FlexWidth",
+qx.Class.define("qx.ui.table.util2.FlexWidth",
 {
  statics :
  {
@@ -39,7 +39,7 @@
     *
     * @param columns {Array}
     *   An array of objects derived from {@link qx.ui.core.Widget}, but most
-     *   typically of class {@link qx.ui.table.util.Data}.  Each element of
+     *   typically of class {@link qx.ui.table.util2.Data}.  Each element of
     *   the columns array is an object derived from {@link qx.ui.core.Widget}
     *   and thus has properties width, minWidth, and maxWidth.  The width
     *   property may take a numeric value indicating a fixed number of pixels

Modified: trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/Widths.js
===================================================================
--- trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util/Widths.js    2008-07-24 13:15:09 UTC (rev 14795)
+++ trunk/qooxdoo/frontend/framework/source/class/qx/ui/table/util2/Widths.js   2008-07-28 12:21:36 UTC (rev 14884)
@@ -26,7 +26,7 @@
 /**
 * Column width array for a whole set of columns
 */
-qx.Class.define("qx.ui.table.util.Widths",
+qx.Class.define("qx.ui.table.util2.Widths",
 {
  extend : qx.core.Object,

@@ -43,7 +43,7 @@
    this._columnData = [ ];
    for (var i = 0; i < numColumns; i++)
    {
-      this._columnData[i] = new qx.ui.table.util.Data();
+      this._columnData[i] = new qx.ui.table.util2.Data();
    }
  },



This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-commit mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-commit



--
"There is nothing more difficult to plan, more doubtful of success, nor more dangerous to manage than the creation of a new system. For the initiator has the enmity of all who would profit by the preservation of the old system and merely lukewarm defenders in those who would gain by the new one." --Machiavelli, 1513

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: [qooxdoo-commit] SF.net SVN: qooxdoo:[14884] trunk/qooxdoo/frontend/framework/source/class/ qx/ui/table

Fabian Jakobs
Administrator
Hi Derrell,
> Hi Fabian,
>
> Be careful about where you put this stuff from ui.util.column.  I had
> split it out from Table because it is useful for other classes.  In
> particular, it's currently also used by Progressive's table.
>
> Cheers,
>
> Derrell

I have modified the resize column renderer to use the new layout manager
to calculate the flex and percent values. I was not entirely sure to
what extend you depended on the fact that qx.ui.util.column.Data extends
Widget. Since the widget interface has changed considerably It would
have been hard to just fix it. If I understand your intentions correct,
you did this mainly to have all those layout properties, like height,
minHeight, maxHeight, ... . In this sense I replaced this class with a
new class, which derived from qx.ui.core.LayoutItem. It has all the
layout relevant properties as well and can be put into a layout manager.
The nice thing about the new layout system is that it can be used
independently of the rest of the widget system. I now use a standard
qooxdoo box layout to do the percent and flex computations. For this
reason qx.ui.util.column.FlexWidth has become obsolete and since
qx.ui.data.column.Widths is now used in the table I removed the "data"
namespace and put the "qx.ui.util.column.Data" class back into the table
namespace.

Right now the "Data" code is only used by the table and the other code
isn't used at all in 0.8. Once you port the progressive table and feel
its useful to have this class outside of the table we can still move it
back.

I hope the changes are in your sense.

Best Fabian


P.S.

The relevant commit is rev. 14887





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: [qooxdoo-commit] SF.net SVN: qooxdoo:[14884] trunk/qooxdoo/frontend/framework/source/class/ qx/ui/table

Derrell Lipman
On Mon, Jul 28, 2008 at 10:40 AM, Fabian Jakobs <[hidden email]> wrote:
Hi Derrell,
> Hi Fabian,
>
> Be careful about where you put this stuff from ui.util.column.  I had
> split it out from Table because it is useful for other classes.  In
> particular, it's currently also used by Progressive's table.
>
> Cheers,
>
> Derrell

I have modified the resize column renderer to use the new layout manager
to calculate the flex and percent values. I was not entirely sure to
what extend you depended on the fact that qx.ui.util.column.Data extends
Widget. Since the widget interface has changed considerably It would
have been hard to just fix it. If I understand your intentions correct,
you did this mainly to have all those layout properties, like height,
minHeight, maxHeight, ... . In this sense I replaced this class with a
new class, which derived from qx.ui.core.LayoutItem. It has all the
layout relevant properties as well and can be put into a layout manager.
The nice thing about the new layout system is that it can be used
independently of the rest of the widget system. I now use a standard
qooxdoo box layout to do the percent and flex computations. For this
reason qx.ui.util.column.FlexWidth has become obsolete and since
qx.ui.data.column.Widths is now used in the table I removed the "data"
namespace and put the "qx.ui.util.column.Data" class back into the table
namespace.

Right now the "Data" code is only used by the table and the other code
isn't used at all in 0.8. Once you port the progressive table and feel
its useful to have this class outside of the table we can still move it
back.

Ok, I'll have to look at how that qx.ui.core.LayoutItem stuff works.

qx.ui.util.column.Data extended Widget in order to be able to do the flex calculations.  Widget already had all of the fields that those calculations used.  I'm not sure, therefore, that qx.ui.util.column.FlexWidth is obsolete; rather, it may just need to be updated to use qx.ui.core.LayoutItem if flex calculations need be done in other widgets which require column width determination (such as Progressive's table).

Do you think you could take a quick look at the function _resizeColumns() in qx/ui/progressive/renderer/table/Row.js and let me know how that might be done in 0.8?

Thanks,

Derrell


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: [qooxdoo-commit] SF.net SVN: qooxdoo:[14884] trunk/qooxdoo/frontend/framework/source/class/ qx/ui/table

Fabian Jakobs
Administrator
Derrell Lipman schrieb:

> On Mon, Jul 28, 2008 at 10:40 AM, Fabian Jakobs
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi Derrell,
>     > Hi Fabian,
>     >
>     > Be careful about where you put this stuff from ui.util.column.
>      I had
>     > split it out from Table because it is useful for other classes.  In
>     > particular, it's currently also used by Progressive's table.
>     >
>     > Cheers,
>     >
>     > Derrell
>
>     I have modified the resize column renderer to use the new layout
>     manager
>     to calculate the flex and percent values. I was not entirely sure to
>     what extend you depended on the fact that qx.ui.util.column.Data
>     extends
>     Widget. Since the widget interface has changed considerably It would
>     have been hard to just fix it. If I understand your intentions
>     correct,
>     you did this mainly to have all those layout properties, like height,
>     minHeight, maxHeight, ... . In this sense I replaced this class with a
>     new class, which derived from qx.ui.core.LayoutItem. It has all the
>     layout relevant properties as well and can be put into a layout
>     manager.
>     The nice thing about the new layout system is that it can be used
>     independently of the rest of the widget system. I now use a standard
>     qooxdoo box layout to do the percent and flex computations. For this
>     reason qx.ui.util.column.FlexWidth has become obsolete and since
>     qx.ui.data.column.Widths is now used in the table I removed the "data"
>     namespace and put the "qx.ui.util.column.Data" class back into the
>     table
>     namespace.
>
>     Right now the "Data" code is only used by the table and the other code
>     isn't used at all in 0.8. Once you port the progressive table and feel
>     its useful to have this class outside of the table we can still
>     move it
>     back.
>
>
> Ok, I'll have to look at how that qx.ui.core.LayoutItem stuff works.
>
> qx.ui.util.column.Data extended Widget in order to be able to do the
> flex calculations.  Widget already had all of the fields that those
> calculations used.  I'm not sure, therefore, that
> qx.ui.util.column.FlexWidth is obsolete; rather, it may just need to
> be updated to use qx.ui.core.LayoutItem if flex calculations need be
> done in other widgets which require column width determination (such
> as Progressive's table).
>
> Do you think you could take a quick look at the function
> _resizeColumns() in qx/ui/progressive/renderer/table/Row.js and let me
> know how that might be done in 0.8?
>
 From first sight it seems straightforward to use the same strategy for
your progressive table as well. You can take a look at
"qx.ui.table.columnmodel.resizebehavior.Default" of how I have done it
in the resize table model. The changes are mainly in
"_computeColumnsFlexWidth".

Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstra├če 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel