org.xwiki.gwt.dom.client
Class TextFragment

java.lang.Object
  extended by org.xwiki.gwt.dom.client.TextFragment

public class TextFragment
extends Object

A text fragment is a substring of a text node from a DOM tree. It is uniquely identified by the source text node, the index of the first character and the index of the last character.

Version:
$Id$

Constructor Summary
TextFragment(Text text, int startIndex, int endIndex)
          Creates a new fragment of the given text node.
 
Method Summary
 int getEndIndex()
           
 int getStartIndex()
           
 Text getText()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFragment

public TextFragment(Text text,
                    int startIndex,
                    int endIndex)
Creates a new fragment of the given text node.

Parameters:
text - the source text node.
startIndex - the index of fragment's first character, in the source text node.
endIndex - the index of fragment's last character, in the source text node.
Method Detail

getText

public Text getText()
Returns:
the source text node.

getStartIndex

public int getStartIndex()
Returns:
the index of fragment's first character, in the source text node.

getEndIndex

public int getEndIndex()
Returns:
the index of fragment's last character, in the source text node.


Copyright © 2004-2012 XWiki. All Rights Reserved.