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.
精彩评论