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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TextAssert that the givenNodeis of typeNode.TEXT_NODEand automatically typecast it.final voiddeleteData(int offset, int length) Deletes data at the given [offset, length] range.final StringgetData()The character data of this text node.final intThe number of characters available through the data property.final voidinsertData(int offset, String data) Inserts character data at the given offset.final voidreplaceData(int offset, int length, String data) Replaces data at the given [offset, length] range with the given string.final voidThe character data of this text node.final TextsplitText(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, setNodeValueMethods 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 givenNodeis of typeNode.TEXT_NODEand 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.
-