如何在DisclosurePanel中使用DockLayoutPanel?

时间:2015-07-20 12:48:52

标签: java gwt

I,

我有一个DisclosurePanel。我想在这个DisclosurePanel中使用DockLayoutPanel(ui.xml)。我找不到任何解决方案。有人知道吗?

我尝试过setContent(EncoderDetails)而没有结果。

由于

    <g:DockLayoutPanel unit="PX" styleName="{style.panel}">
    <g:north size="54">
        <g:HTMLPanel>
            <table width="30%">
                <tr>
                    <td style='padding:0px 0px 0px 10px'>
                        <g:Label text="Target Details"></g:Label>
                    </td>
                    <td style='padding:0px 0px 0px 10px'>
                        <g:TextBox ui:field="targetText" />
                    </td>
                </tr>
            </table>
        </g:HTMLPanel>
    </g:north>

    <g:center size="350">
        <g:HTMLPanel>
            <g:DisclosurePanel ui:field="disclosureDetails"
                stylePrimaryName='menu'>
                <g:header>Details</g:header>
                <g:VerticalPanel ui:field="vPanel">
                </g:VerticalPanel>
            </g:DisclosurePanel>
        </g:HTMLPanel>
    </g:center>

final DisclosurePanel operationsPanel = new DisclosurePanel("Operations");
operationsPanel.setStyleName("fill-layout-width");
operationsPanel.addOpenHandler(new OpenHandler<DisclosurePanel>() {
  @Override
  public void onOpen(
      OpenEvent<DisclosurePanel> event) {
    // TODO Auto-generated method stub
    disclosureDetails.getHeaderTextAccessor().setText("Operations " + targetText.getText());
    encoderDetails = new EncoderCompositeDetails("encoderDetails");
    operationsPanel.setContent(encoderDetails);

    // RootPanel.get().add(operationsPanel);
  }
});

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。这是在这个时候工作,但任何人都有更好的解决方案,我想知道。

我没有使用DockLayoutPanel和north。现在ui.xml以HTMLPanel

开头

看起来DisclosurePanel与DockLayoutPanel不同。我没有尝试过不同类型的小组。