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

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

Introduction

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

Prototype

@Override
    public void show() 

Source Link

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   w ww.ja v  a 2 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//from ww w . j av 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);

}