Example usage for com.google.gwt.user.client.ui HTML HTML

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

Introduction

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

Prototype

protected HTML(Element element) 

Source Link

Document

This constructor may be used by subclasses to explicitly use an existing element.

Usage

From source file:client.Tetris.java

License:Apache License

public static void gameOverEx() {
    // Create the dialog box
    final DialogBox dialogBox = new DialogBox();
    final String gameOverText = "You just lost <a href='http://www.google.com/"
            + "search?q=lost+the+game'>The Game</a>";
    dialogBox.setHTML(gameOverText);/*from ww w . j a v  a 2  s . c  o m*/
    dialogBox.setAnimationEnabled(true);
    HTML html = new HTML("<u>Controls</u><br/>" + "<b>Right Left Down</b>: move around<br/>"
            + "<b>Up</b>: rotate clockwise<br/>" + "<b>Space</b>: drop");
    Button button = new Button("New Game");
    VerticalPanel dialogVPanel = new VerticalPanel();
    dialogVPanel.setWidth("100%");
    dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    dialogVPanel.add(html);
    dialogVPanel.add(button);

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

    // Set the contents of the Widget
    dialogBox.setWidget(dialogVPanel);
    dialogBox.center();
    dialogBox.show();
}

From source file:client.tools.page.ConsoleSettingsPage.java

License:Open Source License

/**
 * @param level/*from w w  w.  ja  va 2  s  .c o  m*/
 */
private final void setValue(final int level) {
    Cookies.setCookie("LogLevel", level + "");

    GuiLogger.setLogLevel(level);

    final HTML text = new HTML("LogLevel successfully changed!");

    final InfoDialog dialog = new InfoDialog("Console Settings", text);

    dialog.show();
    dialog.center();
}

From source file:client.tools.page.NameResolverPage.java

License:Open Source License

/**
 * //from ww w  .ja v  a2  s. co m
 */
public NameResolverPage() {
    this.query = new TextBox();
    this.button = new Button("Resolve");

    this.button.addClickListener(this);

    final VerticalPanel panel = new VerticalPanel();

    panel.add(new HTML("Please enter hostname"));
    panel.add(this.query);
    panel.add(this.button);

    this.initWidget(panel);
}

From source file:client.tools.page.NameResolverPage.java

License:Open Source License

public void onSuccess(final Object result) {
    final String ip = (String) result;

    final HTML text = new HTML(
            ("".equals(ip)) ? "No TNA found for " + this.query.getText() : this.query.getText() + ": " + ip);

    final InfoDialog dialog = new InfoDialog("TNA Lookup", text);

    dialog.show();//from  w w w  . j a  v  a2 s  .com
    dialog.center();
}

From source file:cmg.org.monitor.module.client.InviteUser.java

License:Open Source License

/**
 * Inits the./*  w  ww.ja  v a  2s  . com*/
 */
@Override
protected void init() {
    if (currentPage == HTMLControl.PAGE_INVITE) {
        InviteUser.exportViewDialogFunction();
        InviteUser.exportViewDialogInvite();
        table_list_3rdParty = new Table();
        tableInterface = new FlexTable();
        tableManagement = new FlexTable();
        filter_box = new ListBox();
        filter_box.setTitle("FILTER");
        filter_box.setStyleName("filter_box");
        filter_box.addItem(defaultFilter);
        filter_box.addItem(filter_Active);
        filter_box.addItem(filter_requesting);
        filter_box.addItem(filter_pending);
        tableManagement.setWidget(0, 0, new HTML(
                "<a class=\"btnInviteUser\" title=\"INVITE USER\" onClick=\"javascript:showDialogInvited()\" />"));
        tableManagement.setWidget(0, 1, filter_box);
        /*tableManagement.setWidget(1, 0, panelLog);*/
        tableManagement.setCellPadding(5);
        tableManagement.getCellFormatter().setHorizontalAlignment(0, 1, VerticalPanel.ALIGN_CENTER);
        /*tableManagement.setCellSpacing(20);*/
        initData(defaultFilter);
    }

}

From source file:com.agnie.useradmin.landing.client.presenter.shared.ui.Menu.java

License:Open Source License

public void showMessage(String msg) {
    container.add(new HTML(msg));
}

From source file:com.alkacon.acacia.client.ui.AttributeValueView.java

License:Open Source License

/**
 * Generates the attribute label.<p>
 */// ww w . j a v  a  2  s .  c  om
private void generateLabel() {

    HTML labelWidget = new HTML("<div title=\"" + SafeHtmlUtils.htmlEscape(stripHtml(m_help)) + "\" class=\""
            + formCss().label() + "\">" + m_label + "</div>");
    m_widgetHolder.add(labelWidget);
}

From source file:com.alkacon.acacia.client.ui.ChoiceMenuEntryWidget.java

License:Open Source License

/**
  * Creates a new menu entry instance.<p>
  * //from   w w w . java  2 s  .  c  om
  * @param label the entry label 
  * @param help the entry help text
  * @param menuEntry the menu entry bean 
  * @param selectHandler the select handler 
  * @param choiceWidget the root choice menu 
  * @param submenu the submenu for which this entry is being created 
  */
public ChoiceMenuEntryWidget(String label, String help, final ChoiceMenuEntryBean menuEntry,
        final AsyncCallback<ChoiceMenuEntryBean> selectHandler, AttributeChoiceWidget choiceWidget,
        ChoiceSubmenu submenu) {

    HTML baseWidget = new HTML(label);
    initWidget(baseWidget);
    setStyleName(I_LayoutBundle.INSTANCE.attributeChoice().choice());
    m_entryBean = menuEntry;
    m_selectCallback = selectHandler;
    m_submenu = submenu;
    m_attributeChoiceWidget = choiceWidget;
    setTitle(help);
    if (menuEntry.isLeaf()) {
        baseWidget.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {

                selectHandler.onSuccess(menuEntry);
                ButtonBarHandler.INSTANCE.closeAll();

            }
        });
    }
    addDomHandler(ButtonBarHandler.INSTANCE, MouseOverEvent.getType());
    addDomHandler(ButtonBarHandler.INSTANCE, MouseOutEvent.getType());
}

From source file:com.allen_sauer.gwt.dnd.client.drop.FlowPanelDropController.java

License:Apache License

@Override
protected Widget newPositioner(DragContext context) {
    HTML positioner = new HTML("&#x203B;");
    positioner.addStyleName(DragClientBundle.INSTANCE.css().flowPanelPositioner());
    return positioner;
}

From source file:com.allen_sauer.gwt.dnd.demo.client.BehaviorPanel.java

License:Apache License

BehaviorPanel(String headingHTML, String tooltip) {
    addStyleName(CSS_DEMO_BEHAVIOR_SELECTION);
    HTML heading = new HTML(headingHTML);
    heading.addStyleName(CSS_DEMO_BEHAVIOR_HEADING);
    heading.setTitle(tooltip);//from   ww w  .j  a v  a 2 s.c o m
    add(heading);
}