|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.core.client.JavaScriptObject com.google.gwt.dom.client.Node com.google.gwt.dom.client.Element com.google.gwt.user.client.ui.PotentialElement
public class PotentialElement
EXPERIMENTAL and subject to change. Do not use this in production code.
A simple Element
implementation (not an actual dom
object) that can serve as stand in to be used by IsRenderable
widgets
before they are fully built. For example, it can accumulate simple set*()
values to be used when the widget is actually ready to render. Thus, most
IsRenderable
widget code can be written without taking into account
whether or not the widget has yet been rendered.
DOM#appendChild
is aware of PotentialElement, and calls its
resolve() method. This triggers a call to
UIObject.resolvePotentialElement()
, which widgets can customize
to get a real Element
in place at the last moment.
TODO(rdcastro): Cover all unsupported methods with helpful error messages.
Field Summary |
---|
Fields inherited from class com.google.gwt.dom.client.Element |
---|
DRAGGABLE_AUTO, DRAGGABLE_FALSE, DRAGGABLE_TRUE |
Fields inherited from class com.google.gwt.dom.client.Node |
---|
DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE |
Constructor Summary | |
---|---|
protected |
PotentialElement()
|
Method Summary | |
---|---|
static PotentialElement |
as(Element e)
|
static PotentialElement |
build(UIObject o)
Builds a new PotentialElement with the tag name set to "div". |
static PotentialElement |
build(UIObject o,
java.lang.String tagName)
Builds a new PotentialElement. |
static HtmlElementBuilder |
createBuilderFor(Element potentialElement)
Creates an HtmlElementBuilder instance inheriting all attributes
set for the given PotentialElement. |
static boolean |
isPotential(JavaScriptObject o)
Tests whether a given JavaScriptObject represents a PotentialElement. |
static Element |
resolve(Element maybePotential)
If given a PotentialElement, returns the real Element to be built from it. |
(package private) Element |
setResolver(UIObject resolver)
|
Methods inherited from class com.google.gwt.dom.client.Node |
---|
appendChild, cloneNode, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, hasChildNodes, hasParentElement, insertAfter, insertBefore, insertFirst, isOrHasChild, removeAllChildren, removeChild, removeFromParent, replaceChild, setNodeValue |
Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
---|
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected PotentialElement()
Method Detail |
---|
public static PotentialElement as(Element e)
public static PotentialElement build(UIObject o)
build(UIObject,String)
public static PotentialElement build(UIObject o, java.lang.String tagName)
UIObject
so that it can call
UIObject.resolvePotentialElement()
to get a real element when
that is needed.
public static HtmlElementBuilder createBuilderFor(Element potentialElement)
HtmlElementBuilder
instance inheriting all attributes
set for the given PotentialElement.
potentialElement
- assumed to be a PotentialElement, used as basis for
the builder
HtmlElementBuilder
instancepublic static boolean isPotential(JavaScriptObject o)
JavaScriptObject
represents a PotentialElement.
o
- the JavaScriptObject
to be tested
public static Element resolve(Element maybePotential)
Note that a PotentialElement can only be resolved once. Making repeated calls to this method with the same PotentialElement is an error.
final Element setResolver(UIObject resolver)
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |