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(); }
@Override public void execute() { final DialogBox db = new DialogBox(false, true); db.setText("About MIT App Inventor"); db.setStyleName("ode-DialogBox"); db.setHeight("200px"); db.setWidth("400px"); db.setGlassEnabled(true); db.setAnimationEnabled(true); db.center(); VerticalPanel DialogBoxContents = new VerticalPanel(); HTML message = new HTML( MESSAGES.gitBuildId(GitBuildId.getDate(), GitBuildId.getVersion()) + "<BR/>Use Companion: " + BlocklyPanel.getCompVersion() + "<BR/><BR/>Please see " + RELEASE_NOTES_LINK_AND_TEXT + "<BR/><BR/>" + termsOfServiceText); SimplePanel holder = new SimplePanel(); // holder.setStyleName("DialogBox-footer"); Button ok = new Button("Close"); ok.addClickListener( new ClickListener() { public void onClick(Widget sender) { db.hide(); } }); holder.add(ok); DialogBoxContents.add(message); DialogBoxContents.add(holder); db.setWidget(DialogBoxContents); db.show(); }
/** @param styleName */ public void setStyleName(String styleName) { dialogBox.setStyleName(styleName); }