|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.core.DomQuery
public class DomQuery
Provides high performance selector/xpath processing.
DomQuery supports most of the CSS3 selectors spec, along with some custom selectors and basic XPath.
All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure.
The use of '@' and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.
Constructor Summary | |
---|---|
DomQuery()
|
Method Summary | |
---|---|
static com.google.gwt.user.client.Element[] |
filter(com.google.gwt.user.client.Element[] elems,
java.lang.String selector,
boolean nonMatches)
Filters an array of elements to only include matches of a simple selector (e.g. |
static boolean |
is(com.google.gwt.user.client.Element elem,
java.lang.String selector)
Returns true if the passed element(s) match the passed simple selector (e.g. |
static com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> |
select(java.lang.String selector)
Selects a group of elements using the document as the root node. |
static com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> |
select(java.lang.String selector,
com.google.gwt.user.client.Element root)
Selects a group of elements. |
static com.google.gwt.user.client.Element |
selectNode(java.lang.String selector)
Selects a single element using the document as the root node. |
static com.google.gwt.user.client.Element |
selectNode(java.lang.String selector,
com.google.gwt.user.client.Element root)
Selects a single element using the given root node. |
static java.lang.String |
selectValue(java.lang.String selector,
com.google.gwt.user.client.Element root)
Selects the value of a node, |
static java.lang.String |
selectValue(java.lang.String selector,
com.google.gwt.core.client.JavaScriptObject root)
Selects the value of a node, |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DomQuery()
Method Detail |
---|
public static com.google.gwt.user.client.Element[] filter(com.google.gwt.user.client.Element[] elems, java.lang.String selector, boolean nonMatches)
elems
- an array of elementsselector
- the selector/xpath querynonMatches
- if true, it returns the elements that DON'T match the
selector instead of the ones that match
public static boolean is(com.google.gwt.user.client.Element elem, java.lang.String selector)
elem
- the elementselector
- The selector/xpath query (can be a comma separated list of
selectors)
public static com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> select(java.lang.String selector)
selector
- the selector/xpath query
public static com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> select(java.lang.String selector, com.google.gwt.user.client.Element root)
selector
- the selector/xpath queryroot
- the start of the query
public static com.google.gwt.user.client.Element selectNode(java.lang.String selector)
selector
- the selector/xpath query
public static java.lang.String selectValue(java.lang.String selector, com.google.gwt.user.client.Element root)
selector
- the selector/xpath queryroot
- the start of the query
public static java.lang.String selectValue(java.lang.String selector, com.google.gwt.core.client.JavaScriptObject root)
selector
- the selector/xpath queryroot
- the start of the query
public static com.google.gwt.user.client.Element selectNode(java.lang.String selector, com.google.gwt.user.client.Element root)
selector
- the selector / xpath queryroot
- the start of the query
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |