Example usage for com.google.gwt.dom.client LinkElement setTitle

List of usage examples for com.google.gwt.dom.client LinkElement setTitle

Introduction

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

Prototype

@Override
    public void setTitle(String title) 

Source Link

Usage

From source file:cc.kune.common.client.utils.CSSUtils.java

License:GNU Affero Public License

/**
 * Sets the css./*from  ww w  . ja  v  a2s. c  o m*/
 *
 * @param cssUrl the css url
 * @return the link element
 */
public static LinkElement setCss(final String cssUrl) {
    final Element head = Document.get().getElementsByTagName("head").getItem(0);
    final LinkElement link = Document.get().createLinkElement();
    link.setType("text/css");
    link.setRel("stylesheet");
    link.setHref(cssUrl);
    link.setMedia("screen");
    link.setTitle("dynamicLoadedSheet");
    head.insertAfter(head.getLastChild(), link);
    // you can use removeFromParent
    return link;
}