com.extjs.gxt.ui.client.core
Class DomHelper

java.lang.Object
  extended by com.extjs.gxt.ui.client.core.DomHelper

public class DomHelper
extends java.lang.Object

Utility class for creating elements from HTML fragments.


Constructor Summary
DomHelper()
           
 
Method Summary
static com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element elem, java.lang.String html)
          Creates new DOM element(s) and appends them to el.
static com.google.gwt.user.client.Element insertAfter(com.google.gwt.user.client.Element elem, java.lang.String html)
          Creates new DOM element(s) and inserts them after el.
static com.google.gwt.user.client.Element insertBefore(com.google.gwt.user.client.Element elem, java.lang.String html)
          Creates new DOM element(s) and inserts them before el.
static com.google.gwt.user.client.Element insertFirst(com.google.gwt.user.client.Element elem, java.lang.String html)
          Creates new DOM element(s) and inserts them as the first child of el.
static com.google.gwt.user.client.Element insertHtml(java.lang.String where, com.google.gwt.user.client.Element el, java.lang.String html)
          Inserts an HTML fragment into the DOM.
static com.google.gwt.user.client.Element overwrite(com.google.gwt.user.client.Element elem, java.lang.String html)
          Creates new DOM element(s) and overwrites the contents of el with them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomHelper

public DomHelper()
Method Detail

append

public static com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element elem,
                                                        java.lang.String html)
Creates new DOM element(s) and appends them to el.

Parameters:
elem - the context element
html - raw HTML fragment
Returns:
the new element

insertAfter

public static com.google.gwt.user.client.Element insertAfter(com.google.gwt.user.client.Element elem,
                                                             java.lang.String html)
Creates new DOM element(s) and inserts them after el.

Parameters:
elem - the context element
html - raw HTML fragment
Returns:
the new element

insertBefore

public static com.google.gwt.user.client.Element insertBefore(com.google.gwt.user.client.Element elem,
                                                              java.lang.String html)
Creates new DOM element(s) and inserts them before el.

Parameters:
elem - the context element
html - raw HTML fragment
Returns:
the new element

insertFirst

public static com.google.gwt.user.client.Element insertFirst(com.google.gwt.user.client.Element elem,
                                                             java.lang.String html)
Creates new DOM element(s) and inserts them as the first child of el.

Parameters:
elem - the context element
html - raw HTML fragment
Returns:
the new element

insertHtml

public static com.google.gwt.user.client.Element insertHtml(java.lang.String where,
                                                            com.google.gwt.user.client.Element el,
                                                            java.lang.String html)
Inserts an HTML fragment into the DOM.

Parameters:
where - where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
el - the context element
html - the HTML fragment
Returns:
the new element

overwrite

public static com.google.gwt.user.client.Element overwrite(com.google.gwt.user.client.Element elem,
                                                           java.lang.String html)
Creates new DOM element(s) and overwrites the contents of el with them.

Parameters:
elem - the context element
html - raw HTML fragment
Returns:
the new element