GWT: FlexTable vs Table

蹲街弑〆低调 提交于 2019-12-31 21:22:10

问题


Under what circumstance I should use FlexTable instead of HTMLTable?


回答1:


HTMLTable is an abstract class. FlexTable extends this class as well as Grid. HTMLTable is thus never used directly, but you would use FlexTable or Grid. The question is than probably when to use FlexTable? and when to use Grid?

The difference between those classes is that a Grid always has the same number of rows and/or columns while a FlexTable can have different rows per column and different columns per row (This is made possible due to the html properties rowspan and colspan).

Thus when you need flexibale rows or columns you can use FlexTable and otherwise Grid.

However, FlexTable is extremely slow in Internet Explorer, due to slow DOM methods that are used to create a the table. Therefore, avoid FlexTable if you can or only use it create a simple layout (although in that case the DockPanel might be somewhat easier to use).




回答2:


You can not compare like that.

As per Docs

HTMLTable contains the common table algorithms for Grid and FlexTable.

So Grid or Flextable extends HTMLTable.

And

A Flexible table that creates cells on demand. It can be jagged (that is, each row can contain a different number of cells) and individual cells can be set to span multiple rows or columns.

Now we can have a question Grid or Flextable ???

Here is the Performance difference between grid and Flextable.



来源:https://stackoverflow.com/questions/765638/gwt-flextable-vs-table

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!