Example usage for com.google.gwt.user.client.ui DialogBox setHTML

List of usage examples for com.google.gwt.user.client.ui DialogBox setHTML

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui DialogBox setHTML.

Prototype

public void setHTML(String html) 

Source Link

Document

Sets the html string inside the caption by calling its #setHTML(SafeHtml) method.

Usage

From source file:tv.dyndns.kishibe.qmaclone.client.creation.CreationUi.java

License:Open Source License

private void showRepeatedPostWarning() {
    final DialogBox dialogBox = new DialogBox(true);

    VerticalPanel panel = new VerticalPanel();
    panel.add(//from  ww  w.  jav a2  s. c  o m
            new HTML(new SafeHtmlBuilder()
                    .appendEscapedLines(
                            "????????\n"
                                    + "???????????????\n"
                                    + "??????????")
                    .toSafeHtml()));
    panel.add(new Button("OK", new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            dialogBox.hide();
        }
    }));
    dialogBox.setWidget(panel);
    dialogBox.setAnimationEnabled(true);
    dialogBox.setGlassEnabled(true);
    dialogBox.setHTML(SafeHtmlUtils.fromString("?"));
    dialogBox.setPopupPosition(100, 100);
    dialogBox.show();
}

From source file:uk.ac.ebi.fg.annotare2.prototype.frontier.client.FrontierApp.java

License:Apache License

public void onModuleLoad() {
    helloLabel = new Label();
    helloLabel.setText("Hello, world!");
    helloLabel.addClickHandler(new ClickHandler() {
        @Override//  w  w w.j a v a 2 s.c o m
        public void onClick(ClickEvent event) {
            DialogBox box = new DialogBox();
            box.setGlassEnabled(true);
            box.setHTML("Hello Dialog<a href=\"#\" class=\"icon icon-functional Close\" data-icon=\"x\"></a>");
            box.setWidth("250px");
            box.setWidget(new Label("Hello again!!!"));
            box.center();
            box.show();
        }
    });

    RootPanel content = RootPanel.get("content");
    content.add(helloLabel);

}