public class

Text

extends Node
java.lang.Object
   ↳ com.google.gwt.core.client.JavaScriptObject
     ↳ com.google.gwt.dom.client.Node
       ↳ com.google.gwt.dom.client.Text

Class Overview

The Text interface represents textual content.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.dom.client.Node
Protected Constructors
Text()
Public Methods
static Text as(Node node)
Assert that the given Node is of type 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 getLength()
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 setData(String data)
The character data of this text node.
final Text splitText(int offset)
Splits the data in this node into two separate text nodes.
[Expand]
Inherited Methods
From class com.google.gwt.dom.client.Node
From class com.google.gwt.core.client.JavaScriptObject
From class java.lang.Object

Protected Constructors

protected Text ()

Public Methods

public static Text as (Node node)

Assert that the given Node is of type TEXT_NODE and automatically typecast it.

public final void deleteData (int offset, int length)

Deletes data at the given [offset, length] range.

public final String getData ()

The character data of this text node.

public final int getLength ()

The number of characters available through the data property.

public final void insertData (int offset, String data)

Inserts character data at the given offset.

public final void replaceData (int offset, int length, String data)

Replaces data at the given [offset, length] range with the given string.

public final void setData (String data)

The character data of this text node.

public final Text splitText (int offset)

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.