Example usage for com.google.gwt.user.client DOM createElement

List of usage examples for com.google.gwt.user.client DOM createElement

Introduction

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

Prototype

public static Element createElement(String tagName) 

Source Link

Document

Creates an HTML element.

Usage

From source file:asquare.gwt.sb.client.fw.ListWidgetBasic.java

License:Apache License

@Override
public Element insertCellStructure(int index) {
    Element child = DOM.createElement(m_itemElementType);
    DOM.insertChild(getElement(), child, index);
    m_elements.add(index, child);/*from  ww  w  . j  a  v  a 2  s .  c  o m*/
    return child;
}

From source file:asquare.gwt.sb.client.ui.StreamPanel.java

License:Apache License

/**
 * Constructs a panel with the specified element and display style.
 * // w w  w  . ja  v a  2 s.c om
 * @param element a html element tag
 * @param display a css <code>display</code> style value to apply
 *            to added children
 */
public StreamPanel(String element, String display) {
    setElement(DOM.createElement(element));
    setStyleName("tk-StreamPanel");
    m_elementTreePath.push(getElement());
    m_widgetTreePath.push(this);
    m_display = display;
}

From source file:asquare.gwt.sb.client.ui.StreamPanel.java

License:Apache License

/**
 * Appends an element to the current node. 
 * /*from  ww w. ja  va  2s.c om*/
 * @param type
 */
public Element element(String type) {
    Element element = DOM.createElement(type);
    if (m_display != null)
        DOM.setStyleAttribute(element, "display", m_display);
    DOM.appendChild(m_elementTreePath.peek(), element);
    return element;
}

From source file:asquare.gwt.tk.client.ui.BasicPanel.java

License:Apache License

/**
 * Constructs a panel based on the specified element and display style.
 * /*  w  w  w  . j a  v a  2  s .  c o  m*/
 * @param element a html element tag
 * @param childrenDisplay a css <code>display</code> style value to apply
 *            to added children
 */
public BasicPanel(String element, String childrenDisplay) {
    this(DOM.createElement(element), childrenDisplay);
}

From source file:asquare.gwt.tk.demo.client.DebugPanel.java

License:Apache License

private void addCheckBox(ComplexPanel parent, String label, int mask, ClickListener listener) {
    CheckBox cb = new CheckBox(label);
    cb.setChecked((m_eventListener.getEventMask() & mask) != 0);
    cb.addClickListener(listener);//from ww  w  .  j  a  v a 2  s. c  o  m
    parent.add(cb);
    DOM.appendChild(parent.getElement(), DOM.createElement("br"));
}

From source file:bz.davide.dmweb.shared.view.AbstractHtmlElementView.java

License:Open Source License

protected AbstractHtmlElementView(String tagName) {
    this.attachHandlers = new ArrayList<AttachListener>();
    this.clickHandlers = new ArrayList<DMClickHandler>();
    this.childs = new ArrayList<Node>();

    if (clientSide) {
        this.clientSideElement__ = DOM.createElement(tagName);
        this.id = ELEMENTID_PREFIX + clientSideIdSeq;
        clientSideIdSeq++;//w  ww. ja  v a 2  s  . co m
        this.clientSideElement__.setId(this.id);
    } else {
        this.serverSideElement = new DMServerSideElement(tagName);
    }
}

From source file:cc.alcina.framework.gwt.client.widget.LiPanel.java

License:Apache License

/**
 * Creates an empty flow panel.
 */
public LiPanel() {
    setElement(DOM.createElement("LI"));
}

From source file:cc.alcina.framework.gwt.client.widget.ULPanel.java

License:Apache License

/**
 * Creates an empty flow panel.
 */
public ULPanel() {
    setElement(DOM.createElement("UL"));
}

From source file:ch.systemsx.cisd.openbis.generic.client.web.client.application.util.DOMUtils.java

License:Apache License

/**
 * Creates a &lt;del&gt; <i>HTML</i> element.
 *//*from   w  ww .  j a va2 s.c  om*/
public final static String createDelElement(final String innerText) {
    final Element element = DOM.createElement("del");
    DOM.setInnerText(element, innerText);
    return DOM.toString(element);
}

From source file:ch.takoyaki.email.html.client.ui.generic.FileDownload.java

License:Open Source License

private Element createDomElement() {
    Element a = DOM.createElement("a");
    a.setAttribute("download", fileName);
    a.setAttribute("href", dataUri);
    a.setAttribute("style", "display:none;visibility:hidden;");
    return a;//from w  w w .j  av  a2s  . c  om
}