开发者

GWT Composite that wraps a DockLayoutpanel - Composite or ResizeComposite?

When I implement a custom widget, which wraps a DockLayoutPanel, should I let it extend Composite or ResizeComposite?

The docs say:

When creating a custom Composite widget that wrap a w开发者_如何学编程idget that implements RequiresResize, you should use ResizeComposite as its base class. This subclass of Composite automatically propagates resize events to its wrapped widget.

But in most examples I saw, the custom widget extended Composite.


Since DockLayoutPanel implements RequiresResize you should use a ResizeComposite. Looking at the ResizeComposite source one sees that the only change it makes to Composite is the addition of the onResize() method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜