Package com.google.gwt.user.client.ui

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


          throwable = throwable.getCause();
          if (throwable != null) {
            text += "Caused by: ";
          }
        }
        DialogBox dialogBox = new DialogBox(true);
        DOM.setStyleAttribute(dialogBox.getElement(), "backgroundColor",
            "#ABCDEF");
        System.err.print(text);
        text = text.replaceAll(" ", " ");
        dialogBox.setHTML("<pre>" + text + "</pre>");
        dialogBox.center();
      }
    });

    // Use a deferred command so that the UncaughtExceptionHandler catches
    // exceptions thrown in onModuleLoad2()
View Full Code Here


            /*
             * Show the result box.
             */
            private void showResult(String result, String labelID) {
                DialogBox box = new DialogBox(true);
                Label label = new Label(result);
                label.getElement().setId(labelID);
                box.add(label);
                box.center();
                box.show();
            }

        });
    }
View Full Code Here

    // 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() {
      @Override
      public void onClick(ClickEvent event) {
        dialogBox.hide();
        sendButton.setEnabled(true);
        sendButton.setFocus(true);
      }
    });
View Full Code Here

    // 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);
      }
    });

    // Create a handler for the sendButton and nameField
    class MyHandler implements ClickHandler, KeyUpHandler {
      /**
       * Fired when the user clicks on the sendButton.
       */
      public void onClick(ClickEvent event) {
        sendNameToServer();
      }

      /**
       * Fired when the user types in the nameField.
       */
      public void onKeyUp(KeyUpEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
          sendNameToServer();
        }
      }

      /**
       * Send the name from the nameField to the server and wait for a response.
       */
      private void sendNameToServer() {
        // First, we validate the input.
        errorLabel.setText("");
        String textToServer = nameField.getText();
        if (!FieldVerifier.isValidName(textToServer)) {
          errorLabel.setText("Please enter at least four characters");
          return;
        }
       
        // Then, we send the input to the server.
        sendButton.setEnabled(false);
        textToServerLabel.setText(textToServer);
        serverResponseLabel.setText("");
        greetingService.greetServer(textToServer, new AsyncCallback<String>() {
          public void onFailure(Throwable caught) {
            // Show the RPC error message to the user
            dialogBox.setText("Remote Procedure Call - Failure");
            serverResponseLabel.addStyleName("serverResponseLabelError");
            serverResponseLabel.setHTML(SERVER_ERROR);
            dialogBox.center();
            closeButton.setFocus(true);
          }

          public void onSuccess(String result) {
            dialogBox.setText("Remote Procedure Call");
            serverResponseLabel.removeStyleName("serverResponseLabelError");
            serverResponseLabel.setHTML(result);
            dialogBox.center();
            closeButton.setFocus(true);
          }
        });
      }
    }
View Full Code Here

     * Example event button IngresarRegistro
     */
    btnIngresarRegistro.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        // Dialog Box
         final DialogBox dialogBox = crearVentanaIngreso(event);
             dialogBox.center();
             dialogBox.show();
      }
    });
    verticalPanel.add(btnIngresarRegistro);
    verticalPanel.setCellHorizontalAlignment(btnIngresarRegistro, HasHorizontalAlignment.ALIGN_RIGHT);
       
View Full Code Here

 
  /**
   * Metodo que crear una ventana con el formulario de ingreso
   */
  private DialogBox crearVentanaIngreso(Object event){
        final DialogBox dialogBox = new DialogBox();
       /*
           * Se crear un layout vertical para agregar los componente
           * se puede usar otro componente layout
           */
          VerticalPanel dialogContents = new VerticalPanel();
          dialogContents.setStyleName("tabla-general");    
          dialogContents.setSpacing(4);
          dialogBox.setWidget(dialogContents);
          // Llamada a componente
          IngresarProfesional ingresarProfesional = new IngresarProfesional();
          dialogContents.add(new Label("Ingreso de Profesional"));
          dialogContents.add(ingresarProfesional);
          /*
           * Botones
           * Two button Example
           */
          Button closeButton = new Button("Guardar", new ClickHandler() {
              public void onClick(ClickEvent event) {
                Window.alert("Guardar");
                  dialogBox.hide();
              }
          });
         
          // Add a close button at the bottom of the dialog
          Button deleteButton = new Button("Cancelar", new ClickHandler() {
              public void onClick(ClickEvent event) {
                Window.alert("Cancelar");
                  dialogBox.hide();
              }
          });  
         
        Grid gridBotones = new Grid(1, 3);
        gridBotones.setSize("", "");
View Full Code Here

  private void applicationBusy(AssignStatus statusInProcess)
  {
   
    //TODO: put the GPS trace name and stats in the dialog too
   
    DialogBox dialogBox = new DialogBox();
    dialogBox.setText("Warning");
    dialogBox.setWidget(new HTML("The application is currently not available. Another user is matching GPS points to roads. Please reload the page again later."));
   
    //TODO: change to false for production
    dialogBox.setAutoHideEnabled(true);
   
    dialogBox.setGlassEnabled(true);
    dialogBox.center();
    dialogBox.show();
  }
View Full Code Here

  DialogBox dialog;
  HTML html;
 
  public WaitModalDialog() {
 
    dialog = new DialogBox();
   
    dialog.setAutoHideEnabled(false); // user can't click outside of it
    //dialog.setGlassEnabled(true); // glass the UI behind it
    dialog.center();
   
View Full Code Here

   
    this.eventBus = eventBus;
   
    checkboxes = new ArrayList<CheckBox>();

    dialog = new DialogBox();
   
    niceDayTypeNames.put(TrafficCountRecord.DAYTYPE_WEEKDAY, "Weekday");
    niceDayTypeNames.put(TrafficCountRecord.DAYTYPE_SATURDAY, "Saturday");
    niceDayTypeNames.put(TrafficCountRecord.DAYTYPE_SUNDAY_HOLIDAY, "Sunday/Holiday");
   
View Full Code Here

    buildVehiclesTable();
   
    fmt = DateTimeFormat.getFormat("yyyy-MM-dd");
    fmtHHMM = DateTimeFormat.getFormat("HHmm");
   
    timeHelper = new DialogBox();
    timeHelper.setText("Time Format");
    VerticalPanel vp = new VerticalPanel();
    HTML timeHelperText = new HTML("Time format must be in 24 hour time (HHmm) with no colon. E.g. '1945' instead of '7:45pm'");
    Button vpOK = new Button("OK");
    vpOK.addClickHandler(new ClickHandler() {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.DialogBox$CaptionImpl

Copyright © 2018 www.massapicom. 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.