Search in sources :

Example 91 with HTML

use of com.google.gwt.user.client.ui.HTML in project che by eclipse.

the class Popup method asWidget.

/** {@inheritDoc} */
@Override
public Widget asWidget() {
    if (widget == null) {
        widget = new HTML();
        widget.getElement().appendChild((Node) getView().getElement());
    }
    return widget;
}
Also used : HTML(com.google.gwt.user.client.ui.HTML)

Example 92 with HTML

use of com.google.gwt.user.client.ui.HTML in project che by eclipse.

the class SimpleList method asWidget.

/** {@inheritDoc} */
@Override
public Widget asWidget() {
    if (widget == null) {
        widget = new HTML();
        widget.getElement().appendChild((Node) getView().getElement());
    }
    return widget;
}
Also used : HTML(com.google.gwt.user.client.ui.HTML)

Example 93 with HTML

use of com.google.gwt.user.client.ui.HTML in project che by eclipse.

the class Tree method asWidget.

/** {@inheritDoc} */
@Override
public Widget asWidget() {
    if (widget == null) {
        widget = new HTML();
        Element element = getView().getElement();
        widget.getElement().appendChild((Node) element);
        widget.getElement().getStyle().setOverflow(Style.Overflow.AUTO);
    }
    return widget;
}
Also used : JsElement(elemental.js.dom.JsElement) Element(elemental.dom.Element) HTML(com.google.gwt.user.client.ui.HTML)

Example 94 with HTML

use of com.google.gwt.user.client.ui.HTML in project rstudio by rstudio.

the class DomMetrics method measureHTML.

public static Size measureHTML(String html, String styleName) {
    // create HTML widget which matches the specified style
    HTML measureHTML = new HTML();
    measureHTML.setStyleName(styleName);
    measureHTML.getElement().getStyle().setFloat(Style.Float.LEFT);
    measureHTML.setWordWrap(false);
    // add it to the dom (hidden)
    RootPanel.get().add(measureHTML, -2000, -2000);
    // insert the text (preformatted) and measure it
    measureHTML.setHTML(html);
    Size textSize = new Size(measureHTML.getOffsetWidth(), measureHTML.getOffsetHeight());
    RootPanel.get().remove(measureHTML);
    // return the size
    return textSize;
}
Also used : Size(org.rstudio.core.client.Size) HTML(com.google.gwt.user.client.ui.HTML)

Example 95 with HTML

use of com.google.gwt.user.client.ui.HTML in project rstudio by rstudio.

the class RSConnect method onRSConnectDeploymentFailed.

@Override
public void onRSConnectDeploymentFailed(final RSConnectDeploymentFailedEvent event) {
    String failedPath = event.getData().getPath();
    // if this looks like an API call, process the path to get the 'bare'
    // server URL
    int pos = failedPath.indexOf("__api__");
    if (pos < 1) {
        // if not, just get the host
        pos = failedPath.indexOf("/", 10) + 1;
    }
    if (pos > 0) {
        failedPath = failedPath.substring(0, pos);
    }
    final String serverUrl = failedPath;
    new ModalDialogBase() {

        @Override
        protected Widget createMainWidget() {
            setText("Publish Failed");
            addOkButton(new ThemedButton("OK", new ClickHandler() {

                @Override
                public void onClick(ClickEvent arg0) {
                    closeDialog();
                }
            }));
            HorizontalPanel panel = new HorizontalPanel();
            Image errorImage = new Image(new ImageResource2x(MessageDialogImages.INSTANCE.dialog_error2x()));
            errorImage.getElement().getStyle().setMarginTop(1, Unit.EM);
            errorImage.getElement().getStyle().setMarginRight(1, Unit.EM);
            panel.add(errorImage);
            panel.add(new HTML("<p>Your content could not be published because " + "of a problem on the server.</p>" + "<p>More information may be available on the server's home " + "page:</p>" + "<p><a href=\"" + serverUrl + "\">" + serverUrl + "</a>" + "</p>" + "<p>If the error persists, contact the server's " + "administrator.</p>" + "<p><small>Error code: " + event.getData().getHttpStatus() + "</small></p>"));
            return panel;
        }
    }.showModal();
}
Also used : ThemedButton(org.rstudio.core.client.widget.ThemedButton) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) ModalDialogBase(org.rstudio.core.client.widget.ModalDialogBase) Widget(com.google.gwt.user.client.ui.Widget) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) ImageResource2x(org.rstudio.core.client.resources.ImageResource2x) HTML(com.google.gwt.user.client.ui.HTML) JsArrayString(com.google.gwt.core.client.JsArrayString) Image(com.google.gwt.user.client.ui.Image)

Aggregations

HTML (com.google.gwt.user.client.ui.HTML)170 ViewerPanel (org.cesiumjs.cs.widgets.ViewerPanel)34 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)32 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)31 Confirm (cz.metacentrum.perun.webgui.widgets.Confirm)26 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)21 FlexTable (com.google.gwt.user.client.ui.FlexTable)17 JSONString (com.google.gwt.json.client.JSONString)16 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)14 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)14 Label (com.google.gwt.user.client.ui.Label)14 AbsolutePanel (com.google.gwt.user.client.ui.AbsolutePanel)13 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)12 Image (com.google.gwt.user.client.ui.Image)11 Widget (com.google.gwt.user.client.ui.Widget)11 ViewerOptions (org.cesiumjs.cs.widgets.options.ViewerOptions)11 Button (org.gwtbootstrap3.client.ui.Button)11 ListBox (com.google.gwt.user.client.ui.ListBox)10 ArrayList (java.util.ArrayList)10 SmallLabel (org.uberfire.ext.widgets.common.client.common.SmallLabel)10