Java 类com.google.gwt.user.client.ui.DisclosurePanel 实例源码

项目:LAS    文件:ComparisonAxisSelector.java   
public ComparisonAxisSelector(String width) {
        // The the other widgets have flextable layouts.  Without it, this one doesn't line up.
        layout = new FlexTable();
        axes = new ListBox();
        flex = new FlexTable();
        // It looks funny without some sort of label on the same line.
        HTML html = new HTML("Axis: ");
        flex.setWidget(0, 0, html);
        flex.setWidget(0, 1, axes);
        disPanel = new DisclosurePanel("Compare");
        disPanel.add(flex);
        disPanel.setOpen(true);

//      if ( width != null && !width.equals("") ) {
//          disPanel.setWidth(width);
//      }
        layout.setWidget(0, 0, disPanel);
        initWidget(layout);
    }
项目:synergynet3.1    文件:MediaControlUI.java   
/**
 * Instantiates a new media control ui.
 */
public MediaControlUI()
{
    setTitle("Media Control");
    setSpacing(5);

    DisclosurePanel tableSelectionDisclosurePanel = new DisclosurePanel("Tables Online");
    add(tableSelectionDisclosurePanel);
    tableSelectionDisclosurePanel.setOpen(true);
    tableSelectionDisclosurePanel.setWidth("270px");

    devicesOnline = new DevicesOnlineWidget();
    tableSelectionDisclosurePanel.setContent(devicesOnline);
    devicesOnline.setMultipleSelectionAllowed(true);
    devicesOnline.setSize("270px", "100px");
    devicesOnline.setDeviceType("tables");
    devicesOnline.setAllTablesCheckBoxOffset("120px");
    devicesOnline.setAllTablesCheckOptionEnabled(true);
    devicesOnline.updateList();

    mainButtons();
    networkFlickButtons();
    reloadContentsControls();
    additionalControls();
}
项目:QMAClone    文件:PanelThreadList.java   
public void onSuccess(List<PacketBbsThread> result) {
    for (final PacketBbsThread thread : result) {
        final LazyPanel lazyPanel = new LazyPanel() {
            @Override
            protected Widget createWidget() {
                DecoratorPanel decoratorPanel = new DecoratorPanel();
                decoratorPanel.setWidget(new PanelThread((int) thread.id, thread.title));
                return decoratorPanel;
            }
        };

        OpenHandler<DisclosurePanel> openHandler = new OpenHandler<DisclosurePanel>() {
            @Override
            public void onOpen(OpenEvent<DisclosurePanel> event) {
                lazyPanel.ensureWidget();
            }
        };

        DisclosurePanel disclosurePanel = new DisclosurePanel(thread.title);
        disclosurePanel.setContent(lazyPanel);
        disclosurePanel.addOpenHandler(openHandler);
        add(disclosurePanel);
    }
}
项目:EasyML    文件:DisclosureStackPanel.java   
public DisclosureStackPanel(String title) {

        panel = new DisclosurePanel(title);
        panel.setOpen(true);
        panel.setAnimationEnabled(true);
        panel.getElement().setAttribute("style", "width:100%;");
        panel.setStyleName("myDisclosurePanel");
        panel.getHeader().setStyleName("myDisclosurePanel-header");
        panel.setSize("100%", "100%");
    }
项目:LAS    文件:UI.java   
@Override
public void onClose(CloseEvent<DisclosurePanel> event) {

    for (Iterator panelIt = xPanels.iterator(); panelIt.hasNext();) {
        OutputPanel panel = (OutputPanel) panelIt.next();
        panel.setAnnotationsOpen(false);
    }

}
项目:LAS    文件:UI.java   
@Override
public void onOpen(OpenEvent<DisclosurePanel> event) {

    for (Iterator panelIt = xPanels.iterator(); panelIt.hasNext();) {
        OutputPanel panel = (OutputPanel) panelIt.next();
        panel.setAnnotationsOpen(true);
    }

}
项目:EasyML    文件:DisclosureStackPanel.java   
public DisclosurePanel asWidget() {
    return panel;
}
项目:LAS    文件:AxesWidgetGroup.java   
/**
 * A widget to hold a set of x, y, z, t, and e(nsemble) axis controls and to
 * display them in groups according to the view. Initially the map is at the
 * top and z and t are below, but this can be switched.
 * 
 * @param plot_title
 * @param ortho_title
 * @param layout
 */
public AxesWidgetGroup(String title, String orientation, String width, String panel_title, String tile_server, String tile_layer, EventBus eventBus) {
    mapPanel = new DisclosurePanel("Map");
    mapPanel.setWidth(xControlsWidthPx);
    menuWidgets = new FlexTable();
    refMap = new OLMapWidget("128px", "256px", tile_server, tile_layer);
    zWidget = new AxisWidget();
    zWidget.setVisible(false);
    eWidget = new EnsembleAxisWidget();
    eWidget.setVisible(false);
    dateTimeWidget = new DateTimeWidget();
    dateTimeWidget.setVisible(false);
    forecastVerificationTime = new DateTimeWidget();
    forecastVerificationTime.setVisible(false);
    panel = new FlowPanel();//new DisclosurePanel(title);
    mapPanel.add(refMap);
    mapPanel.setOpen(true);
    if ( orientation.equals("horizontal") ) {
        row.setWidget(0, 0, mapPanel);
        row.setWidget(0, 1, zWidget);
        row.setWidget(0, 2, dateTimeWidget);
        row.setWidget(0, 3, forecastVerificationTime);
        row.setWidget(0, 4, eWidget);
        row.getFlexCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        row.getFlexCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
        row.getFlexCellFormatter().setVerticalAlignment(0, 2, HasVerticalAlignment.ALIGN_TOP);
        row.getFlexCellFormatter().setVerticalAlignment(0, 3, HasVerticalAlignment.ALIGN_TOP);

        panel.add(row);
    } else {
        layout.add(mapPanel);
        panel.add(layout);
        panel.setVisible(true);//.setOpen(true);
        menuWidgets.setWidget(0, 0, zWidget);
        menuWidgets.setWidget(1, 0, dateTimeWidget);
        menuWidgets.setWidget(2, 0, forecastVerificationTime);
        menuWidgets.setWidget(3, 0, eWidget);
        menuWidgets.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        menuWidgets.getCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
        layout.add(menuWidgets);      
    }
    initWidget(panel);
}
项目:ontobrowser    文件:AddRelationshipPopup.java   
private void addDialogWidgets() {
    VerticalPanel vertPanel = new VerticalPanel();
    Grid grid = new Grid(4,2);
    HorizontalPanel buttonsHPanel = new HorizontalPanel();
    DisclosurePanel recentlyViewedPanel = new DisclosurePanel("Recently Viewed Terms");
    DisclosurePanel recentlyCreatedPanel = new DisclosurePanel("Recently Created Terms");
    Button cancelButton = new Button("Cancel");

    recentlyViewedPanel.getHeader().addStyleName("dialog-label");
    recentlyViewedPanel.add(recentlyViewTable);

    recentlyCreatedPanel.getHeader().addStyleName("dialog-label");
    recentlyCreatedPanel.add(recentlyCreatedTable);

    cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            dialogBox.hide();
            if(currentTerm != null) {
                eventBus.fireEvent(new ViewTermEvent(currentTerm));
            }
        }
    });

    grid.addStyleName("gwt-Grid");
    errorLabel.addStyleName("dialog-error");
    buttonsHPanel.addStyleName("dialog-buttons");
    buttonsHPanel.addStyleName("centered-hortz");
    vertPanel.addStyleName("dialog-vpanel");        
    //vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);

    int row = 0, col = 0;
    grid.setWidget(row, col, new Label("Ontology:"));
    grid.setWidget(++row, col, new Label("Term:"));
    grid.setWidget(++row, col, new Label("Relationship:"));
    grid.setWidget(++row, col, new Label("Related Term:"));
    row = 0;
    col = 1;
    grid.setWidget(row, col, ontologyLabel);
    grid.setWidget(++row, col, termLabel);
    grid.setWidget(++row, col, typeDropBox);
    grid.setWidget(++row, col, relatedTermLabel);

    for(row = col = 0; row < grid.getRowCount(); row++) {
        Label label = (Label)grid.getWidget(row, col);
        label.addStyleName("dialog-label");
    }

    buttonsHPanel.add(addButton);
    buttonsHPanel.add(cancelButton);

    vertPanel.add(grid);
    vertPanel.add(recentlyViewedPanel);
    vertPanel.add(recentlyCreatedPanel);
    vertPanel.add(errorLabel);
    vertPanel.add(buttonsHPanel);
    dialogBox.setWidget(vertPanel);
}
项目:ontobrowser    文件:ReplaceTermPopup.java   
private void addDialogWidgets() {
    VerticalPanel vertPanel = new VerticalPanel();
    Grid grid = new Grid(3,2);
    HorizontalPanel buttonsHPanel = new HorizontalPanel();
    DisclosurePanel recentlyViewedPanel = new DisclosurePanel("Recently Viewed Terms");
    DisclosurePanel recentlyCreatedPanel = new DisclosurePanel("Recently Created Terms");
    Label comments = new Label("Comments:");
    Button cancelButton = new Button("Cancel");

    comments.addStyleName("dialog-label");

    recentlyViewedPanel.getHeader().addStyleName("dialog-label");
    recentlyViewedPanel.add(recentlyViewTable);

    recentlyCreatedPanel.getHeader().addStyleName("dialog-label");
    recentlyCreatedPanel.add(recentlyCreatedTable);

    cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            dialogBox.hide();
            obsoleteTerm = null;
            commentsField.setValue(null);
        }
    });

    grid.addStyleName("gwt-Grid");
    errorLabel.addStyleName("dialog-error");
    buttonsHPanel.addStyleName("dialog-buttons");
    buttonsHPanel.addStyleName("centered-hortz");
    vertPanel.addStyleName("dialog-vpanel");        
    //vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);

    int row = 0, col = 0;
    grid.setWidget(row, col, new Label("Ontology:"));
    grid.setWidget(++row, col, new Label("Term:"));
    grid.setWidget(++row, col, new Label("Replaced By:"));
    row = 0;
    col = 1;
    grid.setWidget(row, col, ontologyLabel);
    grid.setWidget(++row, col, termLabel);
    grid.setWidget(++row, col, replaceByTermLabel);

    for(row = col = 0; row < grid.getRowCount(); row++) {
        Label label = (Label)grid.getWidget(row, col);
        label.addStyleName("dialog-label");
    }           

    buttonsHPanel.add(obsoleteButton);
    buttonsHPanel.add(cancelButton);

    vertPanel.add(grid);
    vertPanel.add(recentlyViewedPanel);
    vertPanel.add(recentlyCreatedPanel);
    vertPanel.add(comments);
    vertPanel.add(commentsField);
    vertPanel.add(errorLabel);
    vertPanel.add(buttonsHPanel);
    dialogBox.setWidget(vertPanel);
}
项目:ephesoft    文件:ReviewValidatePanel.java   
public DisclosurePanel getReviewDisclosurePanel() {
    return reviewDisclosurePanel;
}
项目:synergynet3.1    文件:ProjectorControlPanel.java   
/**
 * Instantiates a new projector control panel.
 */
public ProjectorControlPanel()
{

    setTitle("Projector Control");
    setSpacing(5);

    DisclosurePanel pnlProjectors = new DisclosurePanel("Projectors");
    pnlProjectors.setOpen(true);
    add(pnlProjectors);
    pnlProjectors.setWidth("272px");

    VerticalPanel verticalProjectorPanel = new VerticalPanel();
    pnlProjectors.setContent(verticalProjectorPanel);

    projectorsOnline = new DevicesOnlineWidget();
    pnlProjectors.setContent(projectorsOnline);
    projectorsOnline.setMultipleSelectionAllowed(true);
    projectorsOnline.setSize("270px", "100px");
    projectorsOnline.setDeviceType("projectors");
    projectorsOnline.setAllTablesCheckBoxOffset("120px");
    projectorsOnline.setAllTablesCheckOptionEnabled(true);
    projectorsOnline.updateList();

    DisclosurePanel tableSelectionDisclosurePanel = new DisclosurePanel("Tables");
    add(tableSelectionDisclosurePanel);
    tableSelectionDisclosurePanel.setOpen(true);
    tableSelectionDisclosurePanel.setWidth("272");

    tablesOnline = new DevicesOnlineWidget();
    tableSelectionDisclosurePanel.setContent(tablesOnline);
    tablesOnline.setMultipleSelectionAllowed(true);
    tablesOnline.setSize("270px", "100px");
    tablesOnline.setDeviceType("tables");
    tablesOnline.setAllTablesCheckBoxOffset("120px");
    tablesOnline.setAllTablesCheckOptionEnabled(true);
    tablesOnline.updateList();

    transferButtons();

    manageSelectedProjectors();

    tablesOnline.updateList();

}
项目:firefly    文件:CollapsiblePanel.java   
protected DisclosurePanel getDisclosurePanel() {
    return disclosurePanel;
}
项目:gerrit    文件:ComplexDisclosurePanel.java   
@Override
public HandlerRegistration addOpenHandler(OpenHandler<DisclosurePanel> h) {
  return main.addOpenHandler(h);
}
项目:gerrit    文件:ComplexDisclosurePanel.java   
@Override
public HandlerRegistration addCloseHandler(CloseHandler<DisclosurePanel> h) {
  return main.addCloseHandler(h);
}
项目:appformer    文件:DecoratedDisclosurePanel.java   
public HandlerRegistration addOpenHandler(OpenHandler<DisclosurePanel> openHandler) {
    return widget.addOpenHandler(openHandler);
}
项目:appformer    文件:DecoratedDisclosurePanel.java   
public HandlerRegistration addCloseHandler(CloseHandler<DisclosurePanel> handler) {
    return widget.addCloseHandler(handler);
}
项目:qafe-platform    文件:QPagingScrollTableOperation.java   
private void createExportComposite(final QPagingScrollTable table, HorizontalPanel hPanel) {
    createExportLabelsAndImages();

    final DisclosurePanel exportPanel = new DisclosurePanel("Export");
    String[] labels = getExportLabels(table.getSource().getExportFormats());
    Image[] exportImages = getExportImages(labels);

    FlexTable gridExportPanel = new FlexTable();
    hPanel.add(exportPanel);
    exportPanel.add(gridExportPanel);
    final Frame frame = new Frame();
    frame.setHeight("0");
    frame.setWidth("0");
    frame.setVisible(false);
    final String moduleRelativeURL = GWT.getModuleBaseURL() + "/rpc.export";
    gridExportPanel.setWidget(0,0,frame);

    final CheckBox generateColumnHeaderBox= new CheckBox("Generate Column Header");
    gridExportPanel.getFlexCellFormatter().setColSpan(1,1, 7);
    gridExportPanel.setWidget(2, 1,generateColumnHeaderBox);
    gridExportPanel.getFlexCellFormatter().setColSpan(2,1,6);

    for (int i = 0; i < labels.length; i++) {

        exportImages[i].setStylePrimaryName("datagridexportlabel");
        exportImages[i].setTitle(labels[i]);
        gridExportPanel.setWidget(0, i+1,exportImages[i]);

        exportImages[i].addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                if (event.getSource() instanceof Image) {
                    Image image = (Image) (event.getSource());
                    final String exportCode = image.getTitle();
                    RPCServiceAsync service = MainFactoryActions.createService();
                    AsyncCallback<?> callback = new AsyncCallback<Object>() {
                        @Override
                        public void onSuccess(Object result) {
                            String uuid = (String) result;
                            // set frame
                            frame.setUrl(moduleRelativeURL + "?uuid=" + uuid);
                            ClientApplicationContext.getInstance().setBusy(false);
                        }

                        @Override
                        public void onFailure(Throwable caught) {

                            ClientApplicationContext.getInstance().log("Export failed", "Export failed for " + exportCode + " ", true, true, caught);
                            ClientApplicationContext.getInstance().setBusy(false);
                            FunctionsExecutor.setProcessedBuiltIn(true);
                        }
                    };
                    List<DataContainerGVO> dList = new ArrayList<DataContainerGVO>();
                    // following loop is to maintain the order of rows while exporting.
                    for(int i=0;i<(table.getAbsoluteLastRowIndex()+1);i++){
                        dList.add(table.getRowValue(i));
                    }
                    service.prepareForExport(dList, exportCode, null, generateColumnHeaderBox.getValue().booleanValue(),  callback);
                }
            }
        });
    }
}
项目:coaching-notebook    文件:SwotForGrowPanel.java   
public SwotForGrowPanel(final String mode, final RiaContext ctx) {
    i18n = ctx.getI18n();

    if(!QuestionAnswerBean.O_PART.equals(mode)) {
        this.setVisible(false);
        return;
    }

    setStyleName("mf-swotForGrowPanel");

    ctx.setSwotForGrowPanel(this);

    /*
     * view mode
     */

    viewPanel = new HorizontalPanel();
    viewPanel.setStyleName("mf-swotHead");

    swotSectionLabel = new HTML();
    swotSectionLabel.setText(i18n.swot());
    swotSectionLabel.setTitle(i18n.strenghtsToThreats());
    swotSectionLabel.setStyleName("mf-swotLeftTitle");
    viewPanel.add(swotSectionLabel);

    VerticalPanel rightPanel=new VerticalPanel();
    rightPanel.setStyleName("mf-swotRightPanel");

    checklistDocumentation=new HTML(i18n.swotChecklistDocumentation());
    checklistDocumentation.setStyleName("mf-checklistDocumentation");
    rightPanel.add(checklistDocumentation);

    swotChart = new SwotChart(ctx);

    final DisclosurePanel disclosurePanel=new DisclosurePanel(i18n.analysisDetails());
    disclosurePanel.setAnimationEnabled(true);
    disclosurePanel.setContent(swotChart);      
    rightPanel.add(disclosurePanel);

    swotSectionLabel.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            if(ctx.getGrowPanel().isRdWr()) {
                disclosurePanel.setOpen(!disclosurePanel.isOpen());                 
            }
        }
    });

    viewPanel.add(rightPanel);
    add(viewPanel);             
}
项目:coaching-notebook    文件:ActionPlanForGrowPanel.java   
public ActionPlanForGrowPanel(final String mode, final RiaContext ctx) {
    i18n = ctx.getI18n();

    if(!QuestionAnswerBean.W_PART.equals(mode)) {
        this.setVisible(false);
        return;
    }

    setStyleName("mf-actionPlanForGrowPanel");

    /*
     * view mode
     */

    viewPanel = new HorizontalPanel();
    viewPanel.setStyleName("mf-actionPlanHead");

    actionPlanSectionLabel = new HTML();
    actionPlanSectionLabel.setHTML(i18n.action()+"<br/>"+i18n.plan());
    actionPlanSectionLabel.setTitle(i18n.actionPlanTowardsAchievingThisGoal());
    actionPlanSectionLabel.setStyleName("mf-actionPlanLeftTitle");
    viewPanel.add(actionPlanSectionLabel);

    VerticalPanel rightPanel=new VerticalPanel();
    rightPanel.setStyleName("mf-actionPlanRightPanel");

    checklistDocumentation=new HTML(i18n.actionPlanChecklistDocumentation());
    checklistDocumentation.setStyleName("mf-checklistDocumentation");
    rightPanel.add(checklistDocumentation);

    actionItemsTable = new FlexTable();
    actionItemsTable.setStyleName("mf-viewActionPlan");

    final DisclosurePanel disclosurePanel=new DisclosurePanel(i18n.actionPlanDetails());
    disclosurePanel.setAnimationEnabled(true);
    disclosurePanel.setContent(actionItemsTable);
    rightPanel.add(disclosurePanel);

    actionPlanSectionLabel.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            disclosurePanel.setOpen(!disclosurePanel.isOpen());
        }
    });

    viewPanel.add(rightPanel);
    add(viewPanel);             
}
项目:Peergos    文件:CwDisclosurePanel.java   
/**
 * Create a form that contains undisclosed advanced options.
 */
@ShowcaseSource
private Widget createAdvancedForm() {
  // Create a table to layout the form options
  FlexTable layout = new FlexTable();
  layout.setCellSpacing(6);
  layout.setWidth("300px");
  FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();

  // Add a title to the form
  layout.setHTML(0, 0, constants.cwDisclosurePanelFormTitle());
  cellFormatter.setColSpan(0, 0, 2);
  cellFormatter.setHorizontalAlignment(
      0, 0, HasHorizontalAlignment.ALIGN_CENTER);

  // Add some standard form options
  layout.setHTML(1, 0, constants.cwDisclosurePanelFormName());
  layout.setWidget(1, 1, new TextBox());
  layout.setHTML(2, 0, constants.cwDisclosurePanelFormDescription());
  layout.setWidget(2, 1, new TextBox());

  // Create some advanced options
  HorizontalPanel genderPanel = new HorizontalPanel();
  String[] genderOptions = constants.cwDisclosurePanelFormGenderOptions();
  for (int i = 0; i < genderOptions.length; i++) {
    genderPanel.add(new RadioButton("gender", genderOptions[i]));
  }
  Grid advancedOptions = new Grid(2, 2);
  advancedOptions.setCellSpacing(6);
  advancedOptions.setHTML(0, 0, constants.cwDisclosurePanelFormLocation());
  advancedOptions.setWidget(0, 1, new TextBox());
  advancedOptions.setHTML(1, 0, constants.cwDisclosurePanelFormGender());
  advancedOptions.setWidget(1, 1, genderPanel);

  // Add advanced options to form in a disclosure panel
  DisclosurePanel advancedDisclosure = new DisclosurePanel(
      constants.cwDisclosurePanelFormAdvancedCriteria());
  advancedDisclosure.setAnimationEnabled(true);
  advancedDisclosure.ensureDebugId("cwDisclosurePanel");
  advancedDisclosure.setContent(advancedOptions);
  layout.setWidget(3, 0, advancedDisclosure);
  cellFormatter.setColSpan(3, 0, 2);

  // Wrap the contents in a DecoratorPanel
  DecoratorPanel decPanel = new DecoratorPanel();
  decPanel.setWidget(layout);
  return decPanel;
}
项目:solr-explorer    文件:AbstractSearchContextComponent.java   
protected AbstractSearchContextComponent(String title) {
    main = new DisclosurePanel(title);
    main.setAnimationEnabled(true);
    initWidget(main);
}
项目:swarm    文件:CwDisclosurePanel.java   
/**
 * Create a form that contains undisclosed advanced options.
 */
@ShowcaseSource
private Widget createAdvancedForm() {
  // Create a table to layout the form options
  FlexTable layout = new FlexTable();
  layout.setCellSpacing(6);
  layout.setWidth("300px");
  FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();

  // Add a title to the form
  layout.setHTML(0, 0, constants.cwDisclosurePanelFormTitle());
  cellFormatter.setColSpan(0, 0, 2);
  cellFormatter.setHorizontalAlignment(
      0, 0, HasHorizontalAlignment.ALIGN_CENTER);

  // Add some standard form options
  layout.setHTML(1, 0, constants.cwDisclosurePanelFormName());
  layout.setWidget(1, 1, new TextBox());
  layout.setHTML(2, 0, constants.cwDisclosurePanelFormDescription());
  layout.setWidget(2, 1, new TextBox());

  // Create some advanced options
  HorizontalPanel genderPanel = new HorizontalPanel();
  String[] genderOptions = constants.cwDisclosurePanelFormGenderOptions();
  for (int i = 0; i < genderOptions.length; i++) {
    genderPanel.add(new RadioButton("gender", genderOptions[i]));
  }
  Grid advancedOptions = new Grid(2, 2);
  advancedOptions.setCellSpacing(6);
  advancedOptions.setHTML(0, 0, constants.cwDisclosurePanelFormLocation());
  advancedOptions.setWidget(0, 1, new TextBox());
  advancedOptions.setHTML(1, 0, constants.cwDisclosurePanelFormGender());
  advancedOptions.setWidget(1, 1, genderPanel);

  // Add advanced options to form in a disclosure panel
  DisclosurePanel advancedDisclosure = new DisclosurePanel(
      constants.cwDisclosurePanelFormAdvancedCriteria());
  advancedDisclosure.setAnimationEnabled(true);
  advancedDisclosure.ensureDebugId("cwDisclosurePanel");
  advancedDisclosure.setContent(advancedOptions);
  layout.setWidget(3, 0, advancedDisclosure);
  cellFormatter.setColSpan(3, 0, 2);

  // Wrap the contents in a DecoratorPanel
  DecoratorPanel decPanel = new DecoratorPanel();
  decPanel.setWidget(layout);
  return decPanel;
}
项目:x-cure-chat    文件:ActionGridDialog.java   
/**
 * Adds a new Grid to the Vertical panel and wraps it around
 * with a Disclosure panel, the latter can be open or closed
 * @param numberRows the number of rows in the Grid 
 * @param withDisclosure true if we want to have the
 * disclosure panel around the grid.
 * @param title the title of the disclosure panel
 * @param isOpen true for an open disclosure panel
 * @return returns the the added disclosure panel or null if
 *         the disclodure panel did not have to be added, i.e.
 *         withDisclosure == false;
 */
protected DisclosurePanel addNewGrid( int numberRows, boolean withDisclosure, String title, boolean isOpen ){
    return addNewGrid( numberRows, DEFAULT_NUMBER_OF_COLUMNS, withDisclosure, title, isOpen );
}