开发者

Can you create a CellTable composed of CellTables?

This is a GWT question.

I need to create a hierarchical view of a data set. Let me describe what this hierarchical view is supposed to be:

  1. Lay down a rectangle that is 640 by 480 pixels on your screen.
  2. Now 开发者_运维技巧embed 4 rectangles inside the rectangle from the previous step.
    • The 4 rectangles shall evenly take up the space from the enclosing rectangle.
  3. Continue recursively embedding 4 rectangles inside each 4 rectangle...
  4. So on and so forth until a stop condition (like stop recursing at level N).

I plan on doing this with GWT's CellTable. I know how to make a CellTable out of the various out-of-the-box Cell's (what I mean to say is: all the classes that implement the Cell interface ).

But I can't figure out how to make a CellTable of Widgets... or a CellTable of CellTables. I guess my question boils down to... How would you make a new Cell type that is: WidgetCell or CellTableCell?


UPDATE:

I found an answer that describes how to make a Cell out of a Widget: how-can-i-put-a-widget-in-a-celltable-cell

Given the above answer, is my original idea of making a CellTable out of CellTables practically feasible? Is there a more elegant solution? Am I on the right-track?


CellTables do not support widgets. Grid or FlexTable might work better for you, since they do accept widgets - you could make a Grid of CellTables, for instance. Unfortunately, there is no built-in solution that accepts widgets and provides paging.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜