예제 #1
0
  private void popupDbCurator() {

    ClientSequenceDatabase csd = (ClientSequenceDatabase) dlb.getSelected();
    Integer selected = csd.getId();

    Map<String, String> emailInitialPairs = new TreeMap<String, String>();

    for (Map.Entry<String, ClientUser> me : userInfo.entrySet()) {
      emailInitialPairs.put(me.getKey(), me.getValue().getInitials());
    }

    final DialogBox dialogBox = new DialogBox(false);
    CurationEditor ce =
        new CurationEditor(
            selected,
            user.getEmail(),
            emailInitialPairs,
            new EditorCloseCallback() {
              public void editorClosed(final Integer openCurationID) {
                validationController.getAllowedValues(
                    dlb,
                    new Callback() {
                      public void done() {
                        if (openCurationID != null) {
                          dlb.select(openCurationID, validationController);
                        }
                        dialogBox.hide();
                      }
                    });
              }
            });
    DOM.setElementAttribute(dialogBox.getElement(), "id", "db-curator");
    dialogBox.setStyleName("dbCuratorEmbed");
    dialogBox.setWidget(ce);
    dialogBox.setSize(Window.getClientWidth() * .8 + "px", Window.getClientHeight() * .8 + "px");
    ce.setPixelSize(
        Math.max((int) (Window.getClientWidth() * .8), 770), (int) (Window.getClientHeight() * .8));
    //		LightBox lb = new LightBox(dialogBox);
    //		try {
    //			lb.show();
    //		} catch (Exception ignore) {
    dialogBox.show();
    //		}
    dialogBox.center();
  }