Example usage for com.google.gwt.dom.client HeadElement TAG

List of usage examples for com.google.gwt.dom.client HeadElement TAG

Introduction

In this page you can find the example usage for com.google.gwt.dom.client HeadElement TAG.

Prototype

String TAG

To view the source code for com.google.gwt.dom.client HeadElement TAG.

Click Source Link

Usage

From source file:com.seanchenxi.gwt.serenity.client.SerenityUtil.java

License:Apache License

public static String getWpNaming() {
    Element el = Document.get().getElementsByTagName(HeadElement.TAG).getItem(0);
    NodeList<Element> els = el.getElementsByTagName(MetaElement.TAG);
    for (int i = 0; i < els.getLength(); i++) {
        if (SerenityResources.GENERATOR.equalsIgnoreCase(els.getItem(i).getAttribute(SerenityResources.NAME))) {
            return els.getItem(i).getAttribute(SerenityResources.CONTENT);
        }// ww w . ja va  2 s  .co m
    }
    return SerenityResources.MSG.wordpress_Name();
}

From source file:com.seanchenxi.gwt.serenity.client.SerenityUtil.java

License:Apache License

public static String getWpBaseUrl() {
    Element el = Document.get().getElementsByTagName(HeadElement.TAG).getItem(0);
    NodeList<Element> els = el.getElementsByTagName(MetaElement.TAG);
    for (int i = 0; i < els.getLength(); i++) {
        if (SerenityResources.URL.equalsIgnoreCase(els.getItem(i).getAttribute(SerenityResources.NAME))) {
            return els.getItem(i).getAttribute(SerenityResources.CONTENT);
        }/*  www .ja v  a 2 s  . co m*/
    }
    return StringPool.SLASH;
}

From source file:com.vaadin.client.ui.ui.UIConnector.java

License:Apache License

/**
 * Internal helper to get the <head> tag of the page
 * /*from w  ww. ja v a2 s. c  om*/
 * @since 7.3
 * @return the head element
 */
private HeadElement getHead() {
    return HeadElement.as(Document.get().getElementsByTagName(HeadElement.TAG).getItem(0));
}

From source file:org.eclipse.hawkbit.ui.dd.client.criteria.ViewClientCriterion.java

License:Open Source License

/**
 * Styles a multi-row selection with the number of elements.
 *
 * @param drag/*from w w w .j  av a2 s  .  c  om*/
 *            the current drag event holding the context.
 */
void setMultiRowDragDecoration(final VDragEvent drag) {
    final Widget widget = drag.getTransferable().getDragSource().getWidget();

    if (widget instanceof VScrollTable) {
        final VScrollTable table = (VScrollTable) widget;
        final int rowCount = table.selectedRowKeys.size();

        Element dragCountElement = Document.get().getElementById(SP_DRAG_COUNT);
        if (rowCount > 1 && table.selectedRowKeys.contains(table.focusedRow.getKey())) {
            if (dragCountElement == null) {
                dragCountElement = Document.get().createStyleElement();
                dragCountElement.setId(SP_DRAG_COUNT);
                final HeadElement head = HeadElement
                        .as(Document.get().getElementsByTagName(HeadElement.TAG).getItem(0));
                head.appendChild(dragCountElement);
            }
            final SafeHtml formattedCssStyle = getDraggableTemplate()
                    .multiSelectionStyle(determineActiveTheme(drag), String.valueOf(rowCount));
            final StyleElement dragCountStyleElement = StyleElement.as(dragCountElement);
            dragCountStyleElement.setInnerSafeHtml(formattedCssStyle);
        } else if (dragCountElement != null) {
            dragCountElement.removeFromParent();
        }
    }
}