Package com.google.gwt.dom.client
Class Text
java.lang.Object
com.google.gwt.core.client.JavaScriptObject
com.google.gwt.dom.client.Node
com.google.gwt.dom.client.Text
The Text interface represents textual content.
-
Field Summary
Fields inherited from class com.google.gwt.dom.client.Node
DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Text
Assert that the givenNode
is of typeNode.TEXT_NODE
and automatically typecast it.final void
deleteData
(int offset, int length) Deletes data at the given [offset, length] range.final String
getData()
The character data of this text node.final int
The number of characters available through the data property.final void
insertData
(int offset, String data) Inserts character data at the given offset.final void
replaceData
(int offset, int length, String data) Replaces data at the given [offset, length] range with the given string.final void
The character data of this text node.final Text
splitText
(int offset) Splits the data in this node into two separate text nodes.Methods inherited from class com.google.gwt.dom.client.Node
appendChild, as, cloneNode, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, hasChildNodes, hasParentElement, insertAfter, insertBefore, insertFirst, is, 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
-
Constructor Details
-
Text
protected Text()
-
-
Method Details
-
as
Assert that the givenNode
is of typeNode.TEXT_NODE
and automatically typecast it. -
deleteData
public final void deleteData(int offset, int length) Deletes data at the given [offset, length] range. -
getData
The character data of this text node. -
getLength
public final int getLength()The number of characters available through the data property. -
insertData
Inserts character data at the given offset. -
replaceData
Replaces data at the given [offset, length] range with the given string. -
setData
The character data of this text node. -
splitText
Splits the data in this node into two separate text nodes. The text before the split offset is kept in this node, and a new sibling node is created to contain the text after the offset.
-