My approach is to set in code if it would screw things up if anyone were to
play about with the settings, and set in style sheets if you would want to
let people play about with them.
So if you need a widget in a cell-panel to fill the cell, set it to 100% in
code, but set the background colour in a style sheet, for example.

You don't want designers messing with stuff which they can only screw up,
but on the other hand, you don't want to have to recompile and upload
everything if you are asked to make some heading a bit bigger.

Performance wise, I couldn't tell you, but I've never noticed a difference.

Ian

http://examples.roughian.com


2009/3/10 John H <johntan...@gmail.com>

>
> In general, for better performance. Would you rather
>
> public SomePanel extends Panel {
>
>    public SomePanel() {
>        setWidth("100px");
>        setWidth("100px");
>        ............
>    }
>    ..........
> }
>
> OR
>
> panel-style {
>    width: 100px;
>    height: 100px;
> }
>
> I tend to try setting every css style attribute during the creation of
> a panel object just cause I think it's more readable and more flexible
> to organize code outside of CSS style sheets. But is this a better
> approach trying to achieve better performance or not or does it really
> matter?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to