org.netbeans.modules.editor.lib/3 3.23.0 19

org.netbeans.editor
Class DocumentUtilities

java.lang.Object
  extended by org.netbeans.editor.DocumentUtilities

public class DocumentUtilities
extends Object

Various document-related utilities.


Method Summary
static void copyText(Document srcDoc, int srcStartOffset, int srcEndOffset, char[] dst, int dstOffset)
          Copy portion of the document into target character array.
static int getGapStart(Document doc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGapStart

public static int getGapStart(Document doc)
Returns:
>=0 offset of the gap start in the document's content. -1 if the document does not export GapStart interface.

copyText

public static void copyText(Document srcDoc,
                            int srcStartOffset,
                            int srcEndOffset,
                            char[] dst,
                            int dstOffset)
                     throws BadLocationException
Copy portion of the document into target character array.

Parameters:
srcDoc - document from which to copy.
srcStartOffset - offset of the first character to copy.
srcEndOffset - offset that follows the last character to copy.
dst - destination character array into which the data will be copied.
dstOffset - offset in the destination array at which the putting of the characters starts.
Throws:
BadLocationException

org.netbeans.modules.editor.lib/3 3.23.0 19

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.