Just a note on design:
Composite is a minimalist Facade, a front to hide the implementation
details of a new component. initWidget() could be passed a Button just
as well as a complicated Panel hierarchy, it doesn't have to have a
collection of Widget children. As a facade, you should never expose
the internal structure as public....i.e. vPanel2, instead implement
HasWidgets and proxy all methods to vPanel2... your Composite would
implement add(Widget) as:
public void add(Widget w)
{
this.vPanel2.add(w);
}
... // the same for the rest of the HasWidgets interface...
So, again, Composite is made to HIDE it's contents implementation. If
you want your component to act like a Panel, subclass one of the many
Panel
types instead.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---