On Tue, Jan 20, 2009 at 11:15 AM, Jack Yang <jackyang0...@gmail.com> wrote:

> Yes, I truly understand your considerations about the confusing of setting
> the alignment of the widget itself. When I asked myself what might be your
> reason on not having these methods for alignment I think of this point. But,
> I think this is the wrong way. In my opinion, GWT should aim to encapsulate
> all the HTML elements, styles and layouts for its users. Let developers to
> set styles using getElement.getStyle().setProperty("name", "value") actually
> breaks this encapsulation. It needs people to have knowledge on HTML to
> truly understand what this element method means. Simply consider the menubar
> as a normal object and forget about its underlying implementation, obviously
> I think, this object should have methods to control its contents layout.
>
> It's nice to heard voice from people inside google group. What do other
> contributors think about this?
>

Personally, I think a menu is a higher-level concept that should not have
people mucking about with its internals.  If you want something that does
custom things, create your own container for it.  Users have expectations
for what a menu looks like and how it works, and allowing the developer to
make one menu item left-bottom aligned and another one right-top aligned
will break those expectations.

I am not saying there isn't room for more customization of a menu, but I
don't think making it easy to change how the internals are laid out directly
is the right way to do it.  For one, the implementation details may change
between versions or even between browsers, and code that expected it to
always be laid out as a table may break or look incorrect.

-- 
John A. Tamplin
Software Engineer (GWT), Google

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to