给DockLayoutPanel CENTER区域一个样式名称属性?

时间:2012-10-22 22:10:22

标签: java gwt docklayoutpanel

我在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);

    }

1 个答案:

答案 0 :(得分:1)

searchWidget.addStyleName("myStyle");