Examples of DialogBox


Examples of com.google.gwt.user.client.ui.DialogBox

  int statusCode = 0;
  DialogBox timeoutDB;
  Label timeoutMessage;

  private void createConnectAttemptGUI() {
    timeoutDB = new DialogBox();
    timeoutMessage = new Label();
    timeoutDB.add(timeoutMessage);
    RootPanel.get().add(timeoutDB);
    timeoutDB.show();
    timeoutDB.center();
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

    // Focus the cursor on the name field when the app loads
    nameField.setFocus(true);
    nameField.selectAll();

    // Create the popup dialog box
    final DialogBox dialogBox = new DialogBox();
    dialogBox.setText("Remote Procedure Call");
    dialogBox.setAnimationEnabled(true);
    final Button closeButton = new Button("Close");
    // We can set the id of a widget by accessing its Element
    closeButton.getElement().setId("closeButton");
    final Label textToServerLabel = new Label();
    final HTML serverResponseLabel = new HTML();
    VerticalPanel dialogVPanel = new VerticalPanel();
    dialogVPanel.addStyleName("dialogVPanel");
    dialogVPanel.add(new HTML("<b>Sending name to the server:</b>"));
    dialogVPanel.add(textToServerLabel);
    dialogVPanel.add(new HTML("<br><b>Server replies:</b>"));
    dialogVPanel.add(serverResponseLabel);
    dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
    dialogVPanel.add(closeButton);
    dialogBox.setWidget(dialogVPanel);

    // Add a handler to close the DialogBox
    closeButton.addClickHandler(new ClickHandler()
    {
      public void onClick(ClickEvent event)
      {
        dialogBox.hide();
        sendButton.setEnabled(true);
        sendButton.setFocus(true);
      }
    });
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

   
    RootPanel.get().add(dockPanel);
  }
 
  private void showLogonDialog() {
    final DialogBox dialogBox = new DialogBox();
    dialogBox.setText("Login");
    dialogBox.setGlassEnabled(true);
    dialogBox.setAnimationEnabled(true);
   
    VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.setSpacing(4);
    dialogBox.setWidget(verticalPanel);
   
    final TextBox username = new TextBox();
    verticalPanel.add(new HTML("Username:"));
    verticalPanel.add(username);
   
    Button closeButton = new Button("Logon", new ClickHandler() {
      public void onClick(ClickEvent event) {
        dialogBox.hide();
        login(username.getValue());
      }
    });
    verticalPanel.add(closeButton);
   
    dialogBox.center();
    dialogBox.show();
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

    public GraphPanel(InputPanel panel)
    {
        this.inputPanel = panel;
        setCaptionText("Solution");
        setStyleName("bigFontRoundedBorder");
        errorDialog = new DialogBox();
        errorDialog.setAnimationEnabled(true);
        Button closeButton = new Button("Close");
        closeButton.addClickHandler(new ClickHandler()
        {
           
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

   
  }
 
  public static void show() { 
    String panelHeight = (int) Math.floor(com.google.gwt.user.client.Window.getClientHeight() / 8) + "px";
    final DialogBox dialog = new DialogBox();
    dialog.setText(GuiFactory.strings.requestDataDialog());   
    VerticalPanel containerPanel = new VerticalPanel();   
   
    // error statuses
    final Button addErrorsButton = new Button(GuiFactory.strings.addErrors());
    if (!errorStatuses.isEmpty()) {
      final Vector reallyAddFaults = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.provokedFaults()));
      ScrollPanel errorContainerPanel = new ScrollPanel();
      errorContainerPanel.setStyleName("restDescribe-wadlArea");
      errorContainerPanel.setHeight(panelHeight);     
      VerticalPanel errorPanel = new VerticalPanel();
      errorContainerPanel.add(errorPanel);
      containerPanel.add(errorContainerPanel);
     
      Iterator errorIterator = errorStatuses.iterator();
      int i = 0;
      HorizontalPanel horizontalErrorPanel = new HorizontalPanel();     
      errorPanel.add(horizontalErrorPanel);
      Grid grid = new Grid(errorStatuses.size(), 2);     
      horizontalErrorPanel.add(grid);
      while (errorIterator.hasNext()) {       
        final String error = (String) errorIterator.next();
        reallyAddFaults.add(error);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddFaults.contains(error)) {             
              reallyAddFaults.add(error);
            }          
            else {
              if (reallyAddFaults.contains(error)) {
                reallyAddFaults.remove(error);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, error);      
        i++;
      }     
      addErrorsButton.setEnabled(false);
      addErrorsButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          // TODO         
        }
       
      });
      containerPanel.add(addErrorsButton);
    }
   
    // schema locations
    final Button addSchemaButton = new Button(GuiFactory.strings.addSchema());
    if (!schemaLocations.isEmpty()) {
      final Vector reallyAddSchemaLocations = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.schemaLocations()));
      ScrollPanel schemaLocationContainerPanel = new ScrollPanel();
      schemaLocationContainerPanel.setStyleName("restDescribe-wadlArea");
      schemaLocationContainerPanel.setHeight(panelHeight);
      VerticalPanel schemaLocationPanel = new VerticalPanel();
      schemaLocationContainerPanel.add(schemaLocationPanel);
      containerPanel.add(schemaLocationContainerPanel);
     
      Iterator schemaLocationIterator = schemaLocations.iterator();
      int i = 0;
      HorizontalPanel horizontalSchemaPanel = new HorizontalPanel();
      schemaLocationPanel.add(horizontalSchemaPanel);
      Grid grid = new Grid(schemaLocations.size(), 2);
      horizontalSchemaPanel.add(grid);
      while (schemaLocationIterator.hasNext()) {       
        final String schemaLocation = (String) schemaLocationIterator.next();
        reallyAddSchemaLocations.add(schemaLocation);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddSchemaLocations.contains(schemaLocation)) {             
              reallyAddSchemaLocations.add(schemaLocation);
            }          
            else {
              if (reallyAddSchemaLocations.contains(schemaLocation)) {
                reallyAddSchemaLocations.remove(schemaLocation);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, schemaLocation);
        i++;
      }           
      addSchemaButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {                   
          Iterator addSchemaIterator = reallyAddSchemaLocations.iterator();
          while (addSchemaIterator.hasNext()) {
            String include = (String) addSchemaIterator.next();
            if (Analyzer.application.getGrammars() == null) {
              Analyzer.application.addGrammars(new GrammarsNode(Analyzer.application));
            }
            Analyzer.application.grammars.addInclude(include);
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addSchemaButton);
    }

    // default namespace
    final Button addNamespaceButton = new Button(GuiFactory.strings.addNamespace());
    if (!defaultNamespace.isEmpty()) {
      final Vector reallyAddDefaultNamespace = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.defaultNamespaces()));
      ScrollPanel defaultNamespaceContainerPanel = new ScrollPanel();
      defaultNamespaceContainerPanel.setStyleName("restDescribe-wadlArea");
      defaultNamespaceContainerPanel.setHeight(panelHeight);
      VerticalPanel defaultNamespacePanel = new VerticalPanel();
      defaultNamespaceContainerPanel.add(defaultNamespacePanel);
      containerPanel.add(defaultNamespaceContainerPanel);
     
      Iterator defaultNamespaceIterator = defaultNamespace.iterator();
      int i = 0;
      HorizontalPanel horizontalNamespacePanel = new HorizontalPanel();
      defaultNamespacePanel.add(horizontalNamespacePanel);
      Grid grid = new Grid(defaultNamespace.size(), 2);
      horizontalNamespacePanel.add(grid);
      while (defaultNamespaceIterator.hasNext()) {       
        final String defaultNamespace = (String) defaultNamespaceIterator.next();
        reallyAddDefaultNamespace.add(defaultNamespace);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddDefaultNamespace.contains(defaultNamespace)) {             
              reallyAddDefaultNamespace.add(defaultNamespace);
            }          
            else {
              if (reallyAddDefaultNamespace.contains(defaultNamespace)) {
                reallyAddDefaultNamespace.remove(defaultNamespace);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, defaultNamespace);
        i++;
      }           
      addNamespaceButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          Iterator addNamespaceIterator = reallyAddDefaultNamespace.iterator();
          while (addNamespaceIterator.hasNext()) {
            String namespace = (String) addNamespaceIterator.next();           
            Analyzer.application.addNamespace(
                new NamespaceAttribute(null, namespace));
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addNamespaceButton);
    }
    final Button addOtherNamespacesButton = new Button(GuiFactory.strings.addOtherNamespace());
    // other namespaces
    if (!otherNamespaces.isEmpty()) {
      final Vector reallyAddOtherNamespaces = new Vector();
      containerPanel.add(new HTML("<br />" + GuiFactory.strings.otherNamespaces()));
      ScrollPanel otherNamespacesContainerPanel = new ScrollPanel();
      otherNamespacesContainerPanel.setStyleName("restDescribe-wadlArea");     
      otherNamespacesContainerPanel.setHeight(panelHeight);
      VerticalPanel otherNamespacesPanel = new VerticalPanel();
      otherNamespacesContainerPanel.add(otherNamespacesPanel);
      containerPanel.add(otherNamespacesContainerPanel);
     
      Iterator otherNamespacesIterator = otherNamespaces.iterator();
      int i = 0;
      HorizontalPanel horizontalNamespacePanel = new HorizontalPanel();
      otherNamespacesPanel.add(horizontalNamespacePanel);
      Grid grid = new Grid(otherNamespaces.size(), 2);
      horizontalNamespacePanel.add(grid);
      while (otherNamespacesIterator.hasNext()) {       
        final String otherNamespace = (String) otherNamespacesIterator.next();
        reallyAddOtherNamespaces.add(otherNamespace);
        final CheckBox checkBox = new CheckBox();
        checkBox.setChecked(true);
        checkBox.addClickListener(new ClickListener() {
          public void onClick(Widget sender) {
            if (checkBox.isChecked() &&
                !reallyAddOtherNamespaces.contains(otherNamespace)) {             
              reallyAddOtherNamespaces.add(otherNamespace);
            }          
            else {
              if (reallyAddOtherNamespaces.contains(otherNamespace)) {
                reallyAddOtherNamespaces.remove(otherNamespace);
              }
            }
          }         
        });
       
        grid.setWidget(i, 0, checkBox);       
        grid.setText(i, 1, otherNamespace);
        i++;
      }           
      addOtherNamespacesButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {
          Iterator addNamespaceIterator = reallyAddOtherNamespaces.iterator();
          while (addNamespaceIterator.hasNext()) {
            String namespace = (String) addNamespaceIterator.next();           
            Analyzer.application.addNamespace(
                new NamespaceAttribute(null, namespace));
          }
          WadlTreeRoot wadlTreeRoot = new WadlTreeRoot();
          Tree wadlTree = wadlTreeRoot.buildTree(Analyzer.application);
          WadlPanel.wadlArea.clear();
          WadlPanel.wadlArea.setWidget(wadlTree);
        }         
      });
      containerPanel.add(addOtherNamespacesButton);
    }
   
    Button closeButton = new Button(GuiFactory.strings.ok());
    closeButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        if (!otherNamespaces.isEmpty()) {
          addOtherNamespacesButton.click();
        }
        if (!defaultNamespace.isEmpty()) {
          addNamespaceButton.click();
        }
        if (!errorStatuses.isEmpty()) {
          addErrorsButton.click();
        }
        if (!schemaLocations.isEmpty()) {
          addSchemaButton.click();
        }       
        dialog.hide();
        GuiFactory.blockScreen(false);
      }
    });
   
    Button cancelButton = new Button(GuiFactory.strings.cancel());
    cancelButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        dialog.hide();
        GuiFactory.blockScreen(false);
      }
    });
   
    containerPanel.add(new HTML("<br />"));
    HorizontalPanel buttonPanel = new HorizontalPanel();
    buttonPanel.add(closeButton);
    buttonPanel.add(cancelButton);
    containerPanel.add(buttonPanel);
    containerPanel.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_CENTER);   
    
    dialog.setWidget(containerPanel);
    dialog.setPopupPosition(
        (int) Math.round(com.google.gwt.user.client.Window.getClientWidth() * 0.2),
        (int) Math.round(com.google.gwt.user.client.Window.getClientHeight() * 0.05));
    dialog.show();
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

      "GET http://search.yahooapis.com/AudioSearchService/V1/albumSearch?appid=YahooDemo&artistid=XXXXXXP000064565&album=Like&results=2\n" +
      "GET http://search.yahooapis.com/AudioSearchService/V1/songSearch?appid=YahooDemo&albumid=XXXXXXR000012208&results=2\n" +
      "GET http://search.yahooapis.com/AudioSearchService/V1/songDownloadLocation?appid=YahooDemo&songid=XXXXXXT002734752&results=2\n";
 
  public static void show() {
    final DialogBox dialogBox = new DialogBox();   
    dialogBox.setText(GuiFactory.strings.batchUriTitle());   
   
    final VerticalPanel batchUriPanel = new VerticalPanel();
   
    // label
    HorizontalPanel textPanel = new HorizontalPanel();
    textPanel.add(new HTML(GuiFactory.strings.pasteUrisHere()));
   
    final TextArea uriTextArea = new TextArea();
    HTML demoLink = new HTML("<a href=\"#\"><span style=\"font-size:0.8em; padding-left:4em;\">" + GuiFactory.strings.loadDemos() + "</span></a>");
    demoLink.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        uriTextArea.setText(demoStrings);
      }
    });
    textPanel.add(demoLink);
    batchUriPanel.add(new HTML("&nbsp;"));
    batchUriPanel.add(textPanel);
   
    // text area       
    uriTextArea.setWidth(Math.floor(Window.getClientWidth() * 0.85) + "px");
    uriTextArea.setHeight("15em");
    batchUriPanel.add(uriTextArea);
       
    // ok button
    HorizontalPanel buttonPanel = new HorizontalPanel();
    Button okButton = new Button(GuiFactory.strings.ok());
    buttonPanel.add(okButton);
    okButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        // start analysis       
        dialogBox.hide();
        if (uriTextArea.getText().length() > 0) {
          HTML indicator = Indicator.getIndicator(GuiFactory.strings.analyzing());
          RootPanel.get().add(indicator);
          if (Window.confirm(GuiFactory.strings.reallyStartBatchAnalysis())) {
            processRequestStrings(uriTextArea.getText().trim());                  
          }
          RootPanel.get().remove(indicator);
        }
        GuiFactory.blockScreen(false);       
      }
    });
   
    // cancel button
    Button closeButton = new Button(GuiFactory.strings.cancel());
    buttonPanel.add(closeButton);
    closeButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        GuiFactory.blockScreen(false);
        dialogBox.hide();
      }
    });
    batchUriPanel.add(buttonPanel);
    batchUriPanel.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_CENTER);   
   
    dialogBox.setPopupPosition((int) Math.floor(Window.getClientWidth() * 0.075), (int) Math.floor(Window.getClientHeight() / 2.6));
    dialogBox.setWidget(batchUriPanel);
   
    GuiFactory.blockScreen(true);   
    dialogBox.show()
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

  /**
   * Creates the preview wadl dialog
   * @param html The xhtml string containig the syntax-highlighted wadl
   */
  public static void show(String html) {
    final DialogBox dialog = new DialogBox();
    dialog.setText(GuiFactory.strings.wadlPreviewDialog());
   
    VerticalPanel preview = new VerticalPanel();     
    ScrollPanel scrollPanel = new ScrollPanel();
    scrollPanel.setStyleName("restDescribe-wadlArea");
    scrollPanel.setHeight(Math.floor(Window.getClientHeight() * 0.75) + "px");
    scrollPanel.setWidth(Math.floor(Window.getClientWidth() * 0.9) + "px");   
    scrollPanel.add(new HTML(html));     
    preview.add(scrollPanel);
   
    Button closeButton = new Button(GuiFactory.strings.close());
    closeButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        dialog.hide();
        GuiFactory.blockScreen(false);
      }
    });
    preview.add(new HTML("<br />"));
    preview.add(closeButton);
    preview.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_CENTER);
   
    dialog.setWidget(preview);
    dialog.setPopupPosition((int) Math.floor(Window.getClientWidth() * 0.05), (int) Math.floor(Window.getClientHeight() * 0.05));   
    GuiFactory.blockScreen(true);
    dialog.show();
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

  /**
   * Creates the accept wadl dialog
   * @param html The xhtml string containig the syntax-highlighted wadl
   */
  public static void show(final String wadlString) {
    final DialogBox dialog = new DialogBox();
    dialog.setText(GuiFactory.strings.wadlAcceptDialog());
   
    VerticalPanel acceptPanel = new VerticalPanel();     
    final TextArea wadlTextArea = new TextArea();
    wadlTextArea.setStyleName("restDescribe-wadlArea");
    wadlTextArea.setHeight(Math.floor(Window.getClientHeight() * 0.75) + "px");
    wadlTextArea.setWidth(Math.floor(Window.getClientWidth() * 0.9) + "px");
    wadlTextArea.setText(wadlString);   
    acceptPanel.add(wadlTextArea);   
   
    Button closeButton = new Button(GuiFactory.strings.close());
    closeButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        dialog.hide();
        GuiFactory.blockScreen(false);
      }
    });
   
    Button selectAllButton = new Button(GuiFactory.strings.selectAll());
    selectAllButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        selectAll(wadlTextArea);
      }
    });
   
    Button toJsonButton = new Button(GuiFactory.strings.wadl2Json());
    toJsonButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        new XmlHttpRequest(wadlString, SettingsDialog.pathToJsonConverter);
      }
    });   
   
    acceptPanel.add(new HTML("<br />"));
    HorizontalPanel buttonPanel = new HorizontalPanel();
    buttonPanel.add(closeButton);
    buttonPanel.add(selectAllButton);
    if (wadlString.startsWith("<?xml")) {
      buttonPanel.add(new HTML("&nbsp;&nbsp;" + GuiFactory.strings.newFeature()));
      buttonPanel.add(toJsonButton);
    }
    acceptPanel.add(buttonPanel);
    acceptPanel.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_CENTER);
   
    dialog.setWidget(acceptPanel);
    dialog.setPopupPosition((int) Math.floor(Window.getClientWidth() * 0.05), (int) Math.floor(Window.getClientHeight() * 0.05));   
    GuiFactory.blockScreen(true);
    dialog.show();
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

   * Creates the test request dialog
   * @param requestSampleTextBox The request uri textbox
   * @param requestUriTree The corresponding request uri tree
   */
  public static void show(TextBox requestSampleTextBox, final RequestUriTree requestUriTree) {
    final DialogBox dialogBox = new DialogBox();
    dialogBox.setText(GuiFactory.strings.testRequestDialog());   
   
    final Frame frame = new Frame(requestSampleTextBox.getText());
    frame.setWidth(Math.floor(Window.getClientWidth() * 0.9) + "px");
    frame.setHeight(Math.floor(Window.getClientHeight() * 0.75) + "px");
   
    VerticalPanel iframePanel = new VerticalPanel();
    iframePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);

    HorizontalPanel iframeSampleBoxPanel = new HorizontalPanel();  
   
    final TextBox iframeSampleTextBox = new TextBox();
    iframeSampleTextBox.setText(requestSampleTextBox.getText());
    iframeSampleTextBox.setWidth(Math.floor(Window.getClientWidth() * 0.6) + "px");
    iframeSampleBoxPanel.add(iframeSampleTextBox);   
    iframeSampleBoxPanel.add(new HTML("&nbsp;"));   
    
    Button iframeReTestButton = new Button(GuiFactory.strings.reTestRequest());
    iframeReTestButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        frame.setUrl(iframeSampleTextBox.getText());
      }
    });
    iframeSampleBoxPanel.add(iframeReTestButton);
   
    iframeSampleBoxPanel.add(new HTML("&nbsp;"));   
   
    Button iframeAcceptRequestButton = new Button(GuiFactory.strings.acceptRequest());
    iframeAcceptRequestButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {       
        GuiFactory.blockScreen(false);
        requestUriTree.setRequestUri(iframeSampleTextBox.getText());
        dialogBox.hide();           
      }
    });
    iframeSampleBoxPanel.add(iframeAcceptRequestButton);     
   
    iframeSampleBoxPanel.add(new HTML("&nbsp;"));
   
    Button iframeCancelRequestButton = new Button(GuiFactory.strings.cancel());
    iframeCancelRequestButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        GuiFactory.blockScreen(false);
        dialogBox.hide();    
      }
    });
    iframeSampleBoxPanel.add(iframeCancelRequestButton);
   
    iframePanel.add(iframeSampleBoxPanel);   
       
    iframePanel.add(frame);   
   
    GuiFactory.blockScreen(true);  
    dialogBox.setWidget(iframePanel);
    dialogBox.setPopupPosition((int) Math.floor(Window.getClientHeight() * 0.05), (int) Math.floor(Window.getClientHeight() * 0.05));   
    dialogBox.show();
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.DialogBox

  /**
   * Creates and shows the About dialog.
   *
   */
  public static void show() {
    final DialogBox dialogBox = new DialogBox();  
    dialogBox.setText(GuiFactory.strings.aboutRestDescribe());   
   
    VerticalPanel aboutPanel = new VerticalPanel();   
    HTML logoHtml = new HTML(MainMenuPanel.restDescribeLogo + "&nbsp;&nbsp;" + MainMenuPanel.restCompileLogo);
    aboutPanel.setCellHorizontalAlignment(logoHtml, HasHorizontalAlignment.ALIGN_CENTER);
    aboutPanel.add(new HTML("&nbsp;"));
    aboutPanel.add(logoHtml);  
   
    HTML textHtml = new HTML(GuiFactory.strings.aboutHtml());
    aboutPanel.add(textHtml);
   
    Button okButton = new Button(GuiFactory.strings.ok());
    okButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        GuiFactory.blockScreen(false);
        dialogBox.hide();
      }
    });
    aboutPanel.add(new HTML("<br />"));
    aboutPanel.add(okButton);
    aboutPanel.setCellHorizontalAlignment(okButton, HasHorizontalAlignment.ALIGN_CENTER);      
   
    dialogBox.setPopupPosition((int) Math.floor(Window.getClientWidth() / 5), (int) Math.floor(Window.getClientHeight() / 2.6));
    dialogBox.setWidget(aboutPanel);   
   
    GuiFactory.blockScreen(true);   
    dialogBox.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.