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

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


  /*
   * Helper Methods
   */

  private DialogBox createDialog(String title, String html) {
    DialogBox dialogBox = new DialogBox();
    dialogBox.setGlassEnabled(true);
    dialogBox.setAnimationEnabled(true);
    dialogBox.addStyleName("claymus-gwt-Alert");

    dialogBox.setText(title);

    FlowPanel panel = new FlowPanel();
    panel.addStyleName("claymus-t2");
    dialogBox.setWidget(panel);

    HTML message = new HTML(html);
//    message.addStyleName("claymus-t2");
    panel.add(message);

View Full Code Here


  /**
   * Builds the dialog box
   */
  protected About(){
    // create box and hide it
    aboutBox = new DialogBox(false, true);
     
    // Set the dialog box's caption.
      aboutBox.setText("About TEI Comparator");

     
View Full Code Here

  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

      } );
    }
   
    // modulo che si occupa di mostrare un'Alert in caso di errore o inserimento eseguito con successo
    public void showMessage(String s){
      final   DialogBox     db         =  new DialogBox();
          VerticalPanel   vp         =   new VerticalPanel();
          Label       textMessage   =   new Label(s);
      final  Button       button       =   new Button("Chiudi");
      vp.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
      vp.add(textMessage);
      vp.add(button);
     
      pendingDialogue.hide();
     
      db.setAnimationEnabled(true);
      button.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          db.hide();
          button.setEnabled(true);
          button.setFocus(true);
        }
      });
      db.add(vp);
      db.center();
    }
View Full Code Here

        }
        if (create.containsKey(PROPERTY.POPUP_MODAL)) {
            modal = create.getBoolean(PROPERTY.POPUP_MODAL);
        }

        init(create, uiService, new DialogBox(autoHide, modal));
        addCloseHandler(create, uiService);
    }
View Full Code Here

        addCloseHandler(create, uiService);
    }

    @Override
    public void update(final PTInstruction update, final UIService uiService) {
        final DialogBox dialogBox = cast();

        if (update.containsKey(PROPERTY.POPUP_CAPTION)) {
            dialogBox.setHTML(update.getString(PROPERTY.POPUP_CAPTION));
        } else {
            super.update(update, uiService);
        }
    }
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

    // Add image and button to the RootPanel
    RootPanel.get().add(vPanel);

    // Create the dialog box
    final DialogBox dialogBox = new DialogBox();
    dialogBox.setText("Welcome to GWT!");
    dialogBox.setAnimationEnabled(true);
    Button closeButton = new Button("close");
    VerticalPanel dialogVPanel = new VerticalPanel();
    dialogVPanel.setWidth("100%");
    dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    dialogVPanel.add(closeButton);

    closeButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        dialogBox.hide();
      }
    });

    // Set the contents of the Widget
    dialogBox.setWidget(dialogVPanel);
   
    button.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
       
        new TestSound();
View Full Code Here

  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

 
  protected final PreferencesFeature  prefs = PreferencesProvider.get();


  public OauthApprovalPopUp() {
    dialogBox = new DialogBox();
    dialogBox.setAnimationEnabled(true);
       
    detailsHTML = new HTML();
    detailsHTML.setVisible(true);
 
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.