站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

DocumentUtilities (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

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/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.