我在GWT中创建了一个新的DockLayoutPanel,我想在面板的CENTER部分给出一个样式名称。 有什么建议吗?
这是docklayoutpanel:
private DockLayoutPanel doc;
public void onModuleLoad(){
headerWidget = new HeaderWidget();
searchWidget = new SearchWidget();
storeWidget = new StoreWidget();
doc = new DockLayoutPanel(Unit.EM);
doc.addNorth(headerWidget, 10);
doc.addSouth(new HTML("Footer"), 5);
doc.addWest(WidgetWest(), 20);
doc.add(searchWidget);
RootLayoutPanel root = RootLayoutPanel.get();
root.add(doc);
}
答案 0 :(得分:1)
searchWidget.addStyleName("myStyle");