private VLayout createSearchPanel() {

    VLayout searchLayout = new VLayout();
    searchLayout.setWidth100();
    searchLayout.setHeight100();
    searchLayout.setLayoutMargin(10);
    searchLayout.setLayoutMargin(6);
    searchLayout.setMembersMargin(15);

    searchLayout.addMember(createSearchLayout());
    searchLayout.addMember(i_searchListGrid);

    i_searchListGrid
        .getField(SearchValueSetsListGrid.ID_ADD)
        .addCellSavedHandler(
            new CellSavedHandler() {
              @Override
              public void onCellSaved(CellSavedEvent event) {

                boolean hasRecordsToAdd = i_searchListGrid.hasAddRecords();
                i_addButton.setDisabled(!hasRecordsToAdd);
              }
            });

    return searchLayout;
  }
Esempio n. 2
0
  /**
   * Constructor requires message text
   *
   * @param text
   */
  public ActionMessage(String text) {

    VLayout vLayout = new VLayout();
    vLayout.setShowEdges(false);

    vLayout.setWidth100();
    vLayout.setHeight100();

    vLayout.setMembersMargin(0);
    vLayout.setLayoutMargin(0);

    StringBuffer sb = new StringBuffer();

    sb.append(
        "<img style=\"margin:16px;margin-top:24px;margin-left:auto;margin-right:auto;display:block;\" ");
    sb.append("src=\"" + GuiStyles.LOADING_IMAGE + "\" width=\"64\" height=\"64\" />");

    sb.append(
        "<p style=\"font:normal 11px tahoma, arial, helvetica, sans-serif;color:"
            + GuiStyles.FONT_COLOR
            + ";text-align:center;\">"
            + text
            + "</p>");

    HTMLFlow flow = new HTMLFlow();
    flow.setContents(sb.toString());

    vLayout.addMember(flow);
    this.addItem(vLayout);

    this.setTitle(GUIGlobals.APP_TITLE);

    this.setShowCloseButton(false);
    this.setShowMinimizeButton(false);

    this.setBodyColor(GuiStyles.BG_COLOR);

    this.setWidth(240);
    this.setHeight(160);

    this.centerInPage();
    this.draw();
  }
  private VLayout createDisplayLabel() {
    String message =
        "Search for value sets.  Select the value sets by checking the checkbox and then click Add to add them.";
    i_label = new Label("<b>" + message + "<b>");
    i_label.setWidth100();
    i_label.setHeight(30);
    i_label.setMargin(2);
    i_label.setValign(VerticalAlignment.CENTER);
    i_label.setBackgroundColor(BACKGROUND_COLOR);

    final VLayout vLayoutLayoutSpacers = new VLayout();
    vLayoutLayoutSpacers.setWidth100();
    vLayoutLayoutSpacers.setHeight(30);
    vLayoutLayoutSpacers.setBackgroundColor(BACKGROUND_COLOR);
    vLayoutLayoutSpacers.setLayoutMargin(6);
    vLayoutLayoutSpacers.setMembersMargin(6);

    vLayoutLayoutSpacers.addMember(i_label);

    return vLayoutLayoutSpacers;
  }
  private void initLayout() {
    headerView = new HeaderView();
    actionMenubarView = new ActionMenubarView();
    navigationView = new NavigationView();
    baseContainerView = BaseContainerView.getContainer();

    VLayout mainLayout = new VLayout();
    mainLayout.setCanSelectText(true);
    mainLayout.setStyleName("mainLayout");
    mainLayout.setWidth100();
    mainLayout.setHeight100();

    HLayout headerLayout = new HLayout();
    headerLayout.setWidth100();
    headerLayout.setHeight(UIConstants.HEADER_HEIGHT);
    headerLayout.addMember(headerView);
    mainLayout.addMember(headerLayout);

    HLayout centerLayout = new HLayout();

    navigationView.setShowResizeBar(true);
    centerLayout.addMember(navigationView);

    VLayout containerLayout = new VLayout();
    containerLayout.setBorder("1px solid #a1a1a1");
    containerLayout.setLayoutMargin(2);
    // containerLayout.addMember(actionMenubarView);
    containerLayout.addMember(baseContainerView);
    centerLayout.addMember(containerLayout);
    mainLayout.addMember(centerLayout);

    HLayout southLayout = new HLayout();
    southLayout.setWidth100();
    southLayout.setHeight(30);
    mainLayout.addMember(southLayout);

    initWidget(mainLayout);
  }