|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gwtext.client.core.DomHelper
public class DomHelper
Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
DomConfig config = new DomConfig("ul", null, "my-list");
config.addChild(new DomConfig("li", "item0", null, "List Item 0"));
config.addChild(new DomConfig("li", "item1", null, "List Item 1"));
config.addChild(new DomConfig("li", "item2", null, "List Item 2"));
config.addChild(new DomConfig("li", "item3", null, "List Item 3"));
config.addChild(new DomConfig("li", "item4", null, "List Item 4"));
Element list = DomHelper.append("my-div", config);
| Constructor Summary | |
|---|---|
DomHelper()
|
|
| Method Summary | |
|---|---|
static com.google.gwt.user.client.Element |
append(com.google.gwt.user.client.Element parent,
DomConfig config)
Creates new Dom element(s) and appends them to the parent element. |
static com.google.gwt.user.client.Element |
append(com.google.gwt.user.client.Element parent,
com.google.gwt.user.client.Element child)
Creates new Dom element(s) and appends them to the parent element. |
static com.google.gwt.user.client.Element |
append(com.google.gwt.user.client.Element parent,
java.lang.String rawHtml)
Creates new Dom element(s) and appends them to the parent element. |
static com.google.gwt.user.client.Element |
append(java.lang.String parentId,
DomConfig config)
Creates new Dom element(s) and appends them to the parent element. |
static com.google.gwt.user.client.Element |
append(java.lang.String parentId,
java.lang.String rawHtml)
Creates new Dom element(s) and appends them to the parent element. |
static void |
applyStyles(com.google.gwt.user.client.Element element,
java.lang.String styles)
Applies a style specification to an element. |
static Template |
createTemplate(DomConfig config)
Creates a new Template from the Dom config spec. |
static com.google.gwt.user.client.Element |
insertAfter(com.google.gwt.user.client.Element elem,
DomConfig config)
Creates new Dom element(s) and inserts them after the specified element. |
static com.google.gwt.user.client.Element |
insertAfter(com.google.gwt.user.client.Element elem,
com.google.gwt.user.client.Element sibling)
Creates new Dom element and inserts them after the specified element. |
static com.google.gwt.user.client.Element |
insertAfter(com.google.gwt.user.client.Element elem,
java.lang.String rawHtml)
Creates new Dom element(s) and inserts them after the specified element. |
static com.google.gwt.user.client.Element |
insertAfter(java.lang.String id,
DomConfig config)
Creates new Dom element(s) and inserts them after the specified element. |
static com.google.gwt.user.client.Element |
insertAfter(java.lang.String id,
java.lang.String rawHtml)
Creates new Dom element(s) and inserts them after the specified element. |
static com.google.gwt.user.client.Element |
insertBefore(com.google.gwt.user.client.Element elem,
DomConfig config)
Creates new Dom element and inserts them before the specified element. |
static com.google.gwt.user.client.Element |
insertBefore(com.google.gwt.user.client.Element elem,
com.google.gwt.user.client.Element sibling)
Creates new Dom element and inserts them before the specified element. |
static com.google.gwt.user.client.Element |
insertBefore(com.google.gwt.user.client.Element elem,
java.lang.String rawHtml)
Creates new Dom element and inserts them before the specified element. |
static com.google.gwt.user.client.Element |
insertBefore(java.lang.String id,
DomConfig config)
Creates new Dom element and inserts them before the specified element. |
static com.google.gwt.user.client.Element |
insertBefore(java.lang.String id,
java.lang.String rawHtml)
Creates new Dom element and inserts them before the specified element. |
static com.google.gwt.user.client.Element |
insertFirst(com.google.gwt.user.client.Element parent,
DomConfig config)
Creates new Dom element(s) and inserts them as the first child of the parent element. |
static com.google.gwt.user.client.Element |
insertFirst(com.google.gwt.user.client.Element parent,
com.google.gwt.user.client.Element child)
Creates new Dom element(s) and inserts them as the first child of the parent element. |
static com.google.gwt.user.client.Element |
insertFirst(com.google.gwt.user.client.Element parent,
java.lang.String rawHtml)
Creates new Dom element(s) and inserts them as the first child of the parent element. |
static com.google.gwt.user.client.Element |
insertFirst(java.lang.String parentId,
DomConfig config)
Creates new Dom element(s) and inserts them as the first child of the parent element. |
static com.google.gwt.user.client.Element |
insertFirst(java.lang.String parentId,
java.lang.String rawHtml)
Creates new Dom element(s) and inserts them as the first child of the parent element. |
static java.lang.String |
markup(DomConfig config)
Returns the markup for the passed Element config. |
static com.google.gwt.user.client.Element |
overwrite(com.google.gwt.user.client.Element oldElem,
DomConfig config)
Creates new Dom element(s) and overwrites the contents of the old element with them. |
static com.google.gwt.user.client.Element |
overwrite(com.google.gwt.user.client.Element oldElem,
com.google.gwt.user.client.Element newElem)
Creates new Dom element(s) and overwrites the contents of the old element with them. |
static com.google.gwt.user.client.Element |
overwrite(com.google.gwt.user.client.Element oldElem,
java.lang.String newRawHtml)
Creates new Dom element(s) and overwrites the contents of the old element with them. |
static com.google.gwt.user.client.Element |
overwrite(java.lang.String oldId,
DomConfig config)
Creates new Dom element(s) and overwrites the contents of the old element with them. |
static com.google.gwt.user.client.Element |
overwrite(java.lang.String oldId,
java.lang.String newRawHtml)
Creates new Dom element(s) and overwrites the contents of the old element with them. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DomHelper()
| Method Detail |
|---|
public static com.google.gwt.user.client.Element append(java.lang.String parentId,
java.lang.String rawHtml)
parentId - the parent element idrawHtml - raw html blob
public static com.google.gwt.user.client.Element append(java.lang.String parentId,
DomConfig config)
parentId - the parent element idconfig - child dom config
public static com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element parent,
java.lang.String rawHtml)
parent - the parent elementrawHtml - raw html blob
public static com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element parent,
DomConfig config)
parent - the parent elementconfig - child dom config
public static com.google.gwt.user.client.Element append(com.google.gwt.user.client.Element parent,
com.google.gwt.user.client.Element child)
parent - the parent elementchild - child element
public static void applyStyles(com.google.gwt.user.client.Element element,
java.lang.String styles)
element - the element to apply styles tostyles - a style specification string eg "width:100px"public static Template createTemplate(DomConfig config)
config - the dom config
public static com.google.gwt.user.client.Element insertAfter(java.lang.String id,
java.lang.String rawHtml)
id - the element idrawHtml - raw html blob
public static com.google.gwt.user.client.Element insertAfter(java.lang.String id,
DomConfig config)
id - the element idconfig - the element dom config spec
public static com.google.gwt.user.client.Element insertAfter(com.google.gwt.user.client.Element elem,
java.lang.String rawHtml)
elem - the elementrawHtml - the raw html blob
public static com.google.gwt.user.client.Element insertAfter(com.google.gwt.user.client.Element elem,
DomConfig config)
elem - the elementconfig - the element dom config spec
public static com.google.gwt.user.client.Element insertAfter(com.google.gwt.user.client.Element elem,
com.google.gwt.user.client.Element sibling)
elem - the elementsibling - the sibling element
public static com.google.gwt.user.client.Element insertBefore(java.lang.String id,
java.lang.String rawHtml)
id - the element idrawHtml - the raw html blob
public static com.google.gwt.user.client.Element insertBefore(java.lang.String id,
DomConfig config)
id - the element idconfig - the dom config object
public static com.google.gwt.user.client.Element insertBefore(com.google.gwt.user.client.Element elem,
java.lang.String rawHtml)
elem - the elementrawHtml - the raw html blob
public static com.google.gwt.user.client.Element insertBefore(com.google.gwt.user.client.Element elem,
DomConfig config)
elem - the elementconfig - the dom config object
public static com.google.gwt.user.client.Element insertBefore(com.google.gwt.user.client.Element elem,
com.google.gwt.user.client.Element sibling)
elem - the elementsibling - the sibling element
public static com.google.gwt.user.client.Element insertFirst(java.lang.String parentId,
java.lang.String rawHtml)
parentId - the parent element idrawHtml - raw html blob
public static com.google.gwt.user.client.Element insertFirst(java.lang.String parentId,
DomConfig config)
parentId - the parent element idconfig - the child dom config object
public static com.google.gwt.user.client.Element insertFirst(com.google.gwt.user.client.Element parent,
java.lang.String rawHtml)
parent - the parent elementrawHtml - raw html blob
public static com.google.gwt.user.client.Element insertFirst(com.google.gwt.user.client.Element parent,
DomConfig config)
parent - the parent elementconfig - the child dom config object
public static com.google.gwt.user.client.Element insertFirst(com.google.gwt.user.client.Element parent,
com.google.gwt.user.client.Element child)
parent - the parent elementchild - the child element
public static java.lang.String markup(DomConfig config)
config - the element config
public static com.google.gwt.user.client.Element overwrite(java.lang.String oldId,
java.lang.String newRawHtml)
oldId - the old element idnewRawHtml - raw html blob
public static com.google.gwt.user.client.Element overwrite(java.lang.String oldId,
DomConfig config)
oldId - the old element idconfig - the dom config object
public static com.google.gwt.user.client.Element overwrite(com.google.gwt.user.client.Element oldElem,
java.lang.String newRawHtml)
oldElem - the old elementnewRawHtml - raw html blob
public static com.google.gwt.user.client.Element overwrite(com.google.gwt.user.client.Element oldElem,
DomConfig config)
oldElem - the old elementconfig - the dom config object
public static com.google.gwt.user.client.Element overwrite(com.google.gwt.user.client.Element oldElem,
com.google.gwt.user.client.Element newElem)
oldElem - the old elementnewElem - the new element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||