Examples of MyDialog


Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

  }
 
  void userToSignIn() {
    if ( loginPanel == null ) {
      loginPanel = new LoginPanel();
      signInPopup = new MyDialog(loginPanel.getWidget()) {
        public boolean onKeyUpPreview(char key, int modifiers) {
          // avoid ENTER close the popup
          if ( key == KeyboardListener.KEY_ESCAPE  ) {
            hide();
            return false;
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

    }
  }

  private void _doUnregisterOntology(final LoginResult loginResult, final RegisteredOntologyInfo oi) {
   
    final MyDialog popup = new MyDialog(null);
    popup.addTextArea(null).setSize("600", "150");
    popup.getTextArea().setText("please wait ...");
    PortalControl.getInstance().notifyActivity(true);
    popup.setText("Unregistering ontology ...");
    popup.center();
    popup.show();

    AsyncCallback<UnregisterOntologyResult> callback = new AsyncCallback<UnregisterOntologyResult>() {
      public void onFailure(Throwable thr) {
        PortalControl.getInstance().notifyActivity(false);
        Window.alert(thr.toString());
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

    }
   
    String msg = sb.toString();
    Orr.log("Unregistration result: " +msg);

    final MyDialog popup = new MyDialog(null);
    popup.setCloseButtonText("Return to ontology list");
    popup.setText(error == null ? "Unregistration completed" : "Error");
    popup.addTextArea(null).setText(msg);
    popup.getTextArea().setSize("600", "150");
   
    popup.getDockPanel().add(vp, DockPanel.NORTH);
    popup.center();
   
    popup.addPopupListener(new PopupListener() {
      public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
        _completedUnregisterOntology(unregisterOntologyResult);
      }
    });
    popup.show();
  }
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

      return rr >= lines.length;   // DONE
    }
  }

  private void dispatchImportAction() {
    final MyDialog popup = new MyDialog(null) {
      public boolean onKeyUpPreview(char key, int modifiers) {
        // avoid ENTER close the popup
        if ( key == KeyboardListener.KEY_ESCAPE  ) {
          hide();
          return false;
        }
        return true;
      }
    };
    popup.setText("Import terms");
   
    final TextArea textArea = popup.addTextArea(null);
    textArea.setReadOnly(false);
   
    textArea.setSize("800", "270");

   
    VerticalPanel vp = new VerticalPanel();
    vp.setSpacing(10);
    popup.getDockPanel().add(vp, DockPanel.NORTH);
    vp.add(new HTML(
        "Select the separator character, insert the new contents into the text area, " +
        "and click the \"Import\" button to update the table."
        )
    );
   
    final SeparatorPanel separatorPanel = new SeparatorPanel();
    vp.add(separatorPanel);
   
   
    final HTML status = new HTML("");
    textArea.addKeyboardListener(new KeyboardListenerAdapter(){
        public void onKeyUp(Widget sender, char keyCode, int modifiers) {
          status.setText("");
        }
    });

    PushButton importButton = new PushButton("Import", new ClickListener() {
      public void onClick(Widget sender) {
        final String text = textArea.getText().trim();
        if ( text.length() == 0 ) {
          status.setHTML("<font color=\"red\">Empty contents</font>");
          return;
        }
       
        if ( ! Window.confirm("This action will update the term table. (Previous contents will be discarded.)") ) {
          return;
        }
         
        popup.hide();
       
        importContents(separatorPanel.getSelectedSeparator().charAt(0), text);
       
      }
    });
   
    popup.getButtonsPanel().insert(importButton, 0);
    popup.getButtonsPanel().insert(status, 0);
   
    popup.center();
    popup.show();

  }
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

 
  /**
   * Dispatches the "export" action.
   */
  private void exportContents() {
    final MyDialog popup = new MyDialog(null) {
      public boolean onKeyUpPreview(char key, int modifiers) {
        // avoid ENTER close the popup
        if ( key == KeyboardListener.KEY_ESCAPE  ) {
          hide();
          return false;
        }
        return true;
      }
    };
    popup.setText("Table of terms in CSV format");
   
    final TextArea textArea = popup.addTextArea(null);
    textArea.setReadOnly(true);
    textArea.setText(termTable.getCsv(null, ","));
   
    textArea.setSize("800", "270");

   
    VerticalPanel vp = new VerticalPanel();
    vp.setSpacing(10);
    popup.getDockPanel().add(vp, DockPanel.NORTH);
    vp.add(new HTML(
        "Select the separator character for your CSV formatted contents. "
        )
    );
   
    CellPanel separatorPanel = new SeparatorPanel() {
      public void onClick(Widget sender) {
        super.onClick(sender);
        textArea.setText(termTable.getCsv(null, getSelectedSeparator()));
      }
    };
    vp.add(separatorPanel);
   
    popup.center();
    popup.show();

  }
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

    vp.add(new HTML("This table shows an initial evaluation of the loaded ontology in relation " +
        "to the required MMI attributes. " +
        "It shows any included MMI attribute as well as those that are missing but " +
        "required. Use the Metadata section to edit all attributes as necessary."));
    vp.add(table);
    final MyDialog popup = new MyDialog(vp);
    popup.setText("Diagnostics on original metadata");
    popup.center();
    popup.show();
  }
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

       * The issue was that the contents were not yet loaded at this point.
       * Just load contents first, and then do the actual review-and-register
       * in a post-command:
       */
      log("reviewAndRegister: loading contents first ...");
      final MyDialog popup = new MyDialog(null);
      popup.addTextArea(null).setSize("600", "150");
      popup.getTextArea().setText("please wait ...");
      PortalControl.getInstance().notifyActivity(true);
      popup.center();
      popup.setText("Loading ontology contents ...");
      popup.show();
     
      _getOntologyContents(new Command() {
        public void execute() {
          log("reviewAndRegister: calling _doReviewAndRegister");
          _doReviewAndRegister(popup);
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

//      Window.alert("sorry, not implemented yet");
//      return;
//    }
   
   
    final MyDialog popup = aPopup == null ? new MyDialog(null): aPopup;
    if (aPopup == null) {
      popup.addTextArea(null).setSize("600", "150");
      popup.getTextArea().setText("please wait ...");
      PortalControl.getInstance().notifyActivity(true);
      popup.center();
      popup.show();
    }
    popup.setText("Creating ontology ...");

    AsyncCallback<CreateOntologyResult> callback = new AsyncCallback<CreateOntologyResult>() {
      public void onFailure(Throwable thr) {
        PortalControl.getInstance().notifyActivity(false);
        container.clear();       
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

 
  private void doRegister(MyDialog createPopup, CreateOntologyResult createOntologyResult) {
   
    createPopup.hide();
   
    final MyDialog popup = new MyDialog(null);
    popup.addTextArea(null).setText("please wait ...");
    popup.getTextArea().setSize("600", "150");
   
    log("Registering ontology ...");
    popup.setText("Registering ontology ...");
    popup.center();
    popup.show();


    AsyncCallback<RegisterOntologyResult> callback = new AsyncCallback<RegisterOntologyResult>() {
      public void onFailure(Throwable thr) {
        container.clear();       
View Full Code Here

Examples of org.mmisw.orrportal.gwt.client.util.MyDialog

    }
   
    String msg = sb.toString();
    log("Registration result: " +msg);

    final MyDialog popup = new MyDialog(null);
    popup.setCloseButtonText("Return to ontology list");
    popup.setText(error == null ? "Registration completed sucessfully" : "Error");
    popup.addTextArea(null).setText(msg);
    popup.getTextArea().setSize("600", "150");
   
    popup.getDockPanel().add(vp, DockPanel.NORTH);
    popup.center();
   
    popup.addPopupListener(new PopupListener() {
      public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
        PortalControl.getInstance().completedRegisterOntologyResult(uploadOntologyResult);
      }
    });
    popup.show();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.