Which qxd structure should I use? treeVirtual?

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

Which qxd structure should I use? treeVirtual?

lp1051

Hi,

I have following case:
* top-menus + sub-menus - with list of tools like - up/down arrow to move
top-menus or sub-menus (change their order), select boxes, buttons

I'm attaching also image, that could better explain what I mean. In the
beginning I thought, treeVirtual structure could fit best, but now I am not
sure at all...

I would like to be able in some way to reorder the top-menus as well as
sub-menus. Where sub-menus only under the parent top-menu. But I couldn't
find a way how to add, into virtual tree with multiple columns, two images
under one column, or how to add event listener to them. So I didn't start
with reordering yet...
I also thought about drag&drop for this, but I couldn't even set up all the
elements like they should be, so maybe later...

In the case of select boxes, I found possibility in cell editor factory, but
then I have problems with the other fields that should act on dblclick or
click. Column "Items" should on dblclick open dialog (to edit the item
name), Edit layout and Preview buttons should open new window on single
click.

And buttons. As I cannot add form button and I need them with localized
texts (so I skipped Image), I thought about html cell renderer. But, I don't
know how to add some listeners to this html.

Also I tried to enable dynamic height of the rows based on the content, but
with no success. And when I set fixed rowHeight, I couldn't find a way to
set vertical alignment or padding for other columns than "Items", which is
either branch or leaf.


As you can see, I have a lot of issues, and as a qooxdoo newbie I would
really appreciate opinion of somebody more experienced, if I should continue
with virtual tree, or if there is much better way to go.
Of course if you see solution for some of the problems I described, I would
be happy too.

Thanks a lot in advance,
Luke


http://old.nabble.com/file/p26724180/sections.jpg sections.jpg
--
View this message in context: http://old.nabble.com/Which-qxd-structure-should-I-use--treeVirtual--tp26724180p26724180.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Which qxd structure should I use? treeVirtual?

Thomas Herchenroeder
Luke,

I'm not sure I'm getting what you want to achieve. Particularly your use
of the terms "menu" and "tree" are confusing (since as widgets they have
nothing to do with each other). But looking at your screen shot gave me
an idea. - Have you played with the "Tree Highlight" demo in the
Demobrowser [1]? That might be something you can make use of.

T.

[1]
http://demo.qooxdoo.org/devel/demobrowser/index.html#animation~Tree_Highlight.html

lp1051 wrote:

> Hi,
>
> I have following case:
> * top-menus + sub-menus - with list of tools like - up/down arrow to move
> top-menus or sub-menus (change their order), select boxes, buttons
>
> I'm attaching also image, that could better explain what I mean. In the
> beginning I thought, treeVirtual structure could fit best, but now I am not
> sure at all...
>
> I would like to be able in some way to reorder the top-menus as well as
> sub-menus. Where sub-menus only under the parent top-menu. But I couldn't
> find a way how to add, into virtual tree with multiple columns, two images
> under one column, or how to add event listener to them. So I didn't start
> with reordering yet...
> I also thought about drag&drop for this, but I couldn't even set up all the
> elements like they should be, so maybe later...
>
> In the case of select boxes, I found possibility in cell editor factory, but
> then I have problems with the other fields that should act on dblclick or
> click. Column "Items" should on dblclick open dialog (to edit the item
> name), Edit layout and Preview buttons should open new window on single
> click.
>
> And buttons. As I cannot add form button and I need them with localized
> texts (so I skipped Image), I thought about html cell renderer. But, I don't
> know how to add some listeners to this html.
>
> Also I tried to enable dynamic height of the rows based on the content, but
> with no success. And when I set fixed rowHeight, I couldn't find a way to
> set vertical alignment or padding for other columns than "Items", which is
> either branch or leaf.
>
>
> As you can see, I have a lot of issues, and as a qooxdoo newbie I would
> really appreciate opinion of somebody more experienced, if I should continue
> with virtual tree, or if there is much better way to go.
> Of course if you see solution for some of the problems I described, I would
> be happy too.
>
> Thanks a lot in advance,
> Luke
>
>
> http://old.nabble.com/file/p26724180/sections.jpg sections.jpg
>  

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Which qxd structure should I use? treeVirtual?

lp1051

Hi T.,

Yes, I was playing with the example in demobrowser and that's why I wanted
to ask for advice. The functionality demonstrated for normal tree was
exactly what I needed for reordering the Folders and Files, but virtual tree
offered me the table layout. Besides I needed the select boxes and buttons
besides the labels, so I thought altering cellrenderer and celleditor for
table should be simpler than doing something similar for normal tree... So I
didn't know what shall I prefer, what is easier to implement.

I decided for virtual tree, when I didn't get answer previous week. But I am
not so far yet, so if you think
normal tree would be better, considering the multi columns and specific
content of cells (not just text), I can still update my design.

Btw. I was a little surprised why is it so difficult to add eg. button into
table cell. Is there a way to add qx.ui.form.Button() or do I need to use
HTML renderer and copy the html I get from qx.ui.form.Button()?


Thank you,
Luke



thron7-2 wrote:

>
> Luke,
>
>  - Have you played with the "Tree Highlight" demo in the
> Demobrowser [1]? That might be something you can make use of.
>
> T.
>
> [1]
> http://demo.qooxdoo.org/devel/demobrowser/index.html#animation~Tree_Highlight.html
>
--
View this message in context: http://old.nabble.com/Which-qxd-structure-should-I-use--treeVirtual--tp26724180p26808351.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Which qxd structure should I use? treeVirtual?

Thomas Herchenroeder
Luke,

lp1051 wrote:

> Hi T.,
>
> Yes, I was playing with the example in demobrowser and that's why I wanted
> to ask for advice. The functionality demonstrated for normal tree was
> exactly what I needed for reordering the Folders and Files, but virtual tree
> offered me the table layout. Besides I needed the select boxes and buttons
> besides the labels, so I thought altering cellrenderer and celleditor for
> table should be simpler than doing something similar for normal tree... So I
> didn't know what shall I prefer, what is easier to implement.
>
> I decided for virtual tree, when I didn't get answer previous week. But I am
> not so far yet, so if you think
> normal tree would be better, considering the multi columns and specific
> content of cells (not just text), I can still update my design.
>  

I'm neither a tree nor a table expert, but what you write sounds
sensible to me. Maybe Derrell can jump in with better advice.

> Btw. I was a little surprised why is it so difficult to add eg. button into
> table cell. Is there a way to add qx.ui.form.Button() or do I need to use
> HTML renderer and copy the html I get from qx.ui.form.Button()?
>  

I think the base line with table is that you in general cannot use
*widgets* in cells. This will only be possible with the new virtual
widgets that are in the making.

T.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Which qxd structure should I use? treeVirtual?

oetiker
Hi Luke,

Today thron7 wrote:

> Luke,
>
> lp1051 wrote:
> > Hi T.,
> >
> > Yes, I was playing with the example in demobrowser and that's why I wanted
> > to ask for advice. The functionality demonstrated for normal tree was
> > exactly what I needed for reordering the Folders and Files, but virtual tree
> > offered me the table layout. Besides I needed the select boxes and buttons
> > besides the labels, so I thought altering cellrenderer and celleditor for
> > table should be simpler than doing something similar for normal tree... So I
> > didn't know what shall I prefer, what is easier to implement.
> >
> > I decided for virtual tree, when I didn't get answer previous week. But I am
> > not so far yet, so if you think
> > normal tree would be better, considering the multi columns and specific
> > content of cells (not just text), I can still update my design.
> >
>
> I'm neither a tree nor a table expert, but what you write sounds
> sensible to me. Maybe Derrell can jump in with better advice.
>
> > Btw. I was a little surprised why is it so difficult to add eg. button into
> > table cell. Is there a way to add qx.ui.form.Button() or do I need to use
> > HTML renderer and copy the html I get from qx.ui.form.Button()?
> >
>
> I think the base line with table is that you in general cannot use
> *widgets* in cells. This will only be possible with the new virtual
> widgets that are in the making.

the reason for this is, that cellrenderer (the 'widgets' makeing up
the table cells content) spit out html strings which are then
assembled into the actual content of the table ... this has nothing
todo with classic qooxdoo widgets ... this aproach was taken due to
performance considerations (DOM manipulation being more expensive
than generating html strings and writing them to innerHTML) ...

there was some discussion on the reasoning a few weeks back in
connection with my canvas cellrenderer implementation.

cheers
tobi


--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Which qxd structure should I use? treeVirtual?

Derrell Lipman
In reply to this post by lp1051
On Wed, Dec 16, 2009 at 04:20, lp1051 <[hidden email]> wrote:


Yes, I was playing with the example in demobrowser and that's why I wanted
to ask for advice. The functionality demonstrated for normal tree was
exactly what I needed for reordering the Folders and Files, but virtual tree
offered me the table layout.

If you will have a relatively small number of nodes in your tree (fewer than 100 is pretty easy; more than that and you'll have to experiment with performance), then the Tree should do fine for you. Tree does support multiple columns, as demonstrated here:

  http://demo.qooxdoo.org/devel/demobrowser/index.html#widget~Tree_Columns.html
 
Btw. I was a little surprised why is it so difficult to add eg. button into
table cell.

TreeVirtual provides, as you may have guessed from the name but not really understood what it meant, a "virtual" tree. This means that rows of the tree are rendered as they become visible. When new rows become visible, the rendered portion of the screen is replaced with rendering of the new rows. Although browsers are getting better and better, rendering is still very slow compared to other processing done on widgets, so eliminating any unnecessary rendering is particularly useful to avoid noticeable delays. The rendering is done at a low level, using cell renderer classes which output HTML. There is never an actual qooxdoo widget instantiated for each of the rows or cells, which is advantageous for speed, but means that the nice benefits of qooxdoo widgets are not available within qooxdoo's Table or TreeVirtual (which extends Table).

Is there a way to add qx.ui.form.Button() or do I need to use
HTML renderer and copy the html I get from qx.ui.form.Button()?

Even if you add all of the HTML that a Button generates, you won't get the full functionality of a Button widget. Events, for example, have their listeners within the Button and its superclasses code, which will not be available simply from copying the HTML. TreeVirtual is a different beast than Tree. Each has its advantages and disadvantages, so you'll need to choose the one most appropriate for your use.

Hope that helps explain things.

Cheers,

Derrell


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel