当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
DocumentUtilities (Editor Library) - NetBeans API Javadoc (Current Development Version)
org.netbeans.editor
Class DocumentUtilities
java.lang.Object
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 |
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