本文介绍了GWT:FlexTable vs Table的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在什么情况下,我应该使用FlexTable而不是HTMLTable? 解析方案

HTMLTable是一个抽象类。 FlexTable扩展了这个类以及Grid。因此,HTMLTable不会直接使用,但可以使用FlexTable或Grid。问题是可能何时使用FlexTable?以及何时使用Grid?

这些类的区别在于,网格始终具有相同数量的行和/或列,而FlexTable每列可以有不同的行和每行不同的列(由于html属性rowspan和colspan,这是可能的)。



因此,当您需要flexibale行或列时,可以使用FlexTable, 。

然而,由于用于创建表的缓慢的DOM方法, FlexTable在Internet Explorer中非常缓慢。因此,如果可以或者仅使用它,请避免使用FlexTable创建一个简单的布局(尽管在这种情况下,DockPanel可能会更容易使用)。


Under what circumstance I should use FlexTable instead of HTMLTable?

解决方案

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).

这篇关于GWT:FlexTable vs Table的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 20:14