Maneesh Godbole wrote:These components call the setStyleName("styleName") when they are initialized. You do not need to make explicit calls yourself.
I found it quite confusing.
when new a gwt project, the default css file has some style class for some component but not all.
for example, TabBar has corresponding css class in css file as follow:
but some component like DockPanel has no default css class in the css file.
if I add the style class in css as follow:
and then write the following code:
I found the following result
tabBar1.getStylePrimaryName() = gwt-TabBar
dockPanel1 primaryStyleName =
dockPanel1 primaryStyleName = gwt-DockPanel
that is, if the css file default has that classname, then when create the widget, the component will automatically set their stylePrimaryName corresponding to the css file,
but if the widget has no default css style class in css file and we add it manually, then even using their naming convention "gwt-"+ WidgetName, the widget still cannot automatically set
is it normal behavior of gwt?