public static interface AbstractDocument.Content 
      AbstractDocument 
       | Modifier and Type | Method and Description | 
|---|---|
| Position | createPosition(int offset)
              在内容中创建一个位置,该内容将随内容突变而跟踪更改。 
             | 
| void | getChars(int where, int len, Segment txt)
              获取一系列字符并将其复制到段中。 
             | 
| String | getString(int where, int len)
              获取序列中包含的一串字符。 
             | 
| UndoableEdit | insertString(int where, String str)
              在序列中插入一串字符。 
             | 
| int | length()
              字符内容序列的当前长度。 
             | 
| UndoableEdit | remove(int where, int nitems)
              删除序列的一部分。 
             | 
Position createPosition(int offset) throws BadLocationException
offset - 内容中的偏移量> = 0 
           BadLocationException - 无效的偏移量 
           int length()
UndoableEdit insertString(int where, String str) throws BadLocationException
where - 偏移到序列使插入> = 0 
           str - 要插入的字符串 
           Edit ,否则返回 
            null 
           BadLocationException - 如果参数覆盖的区域不包含在字符序列中,则抛出 
           UndoableEdit remove(int where, int nitems) throws BadLocationException
where - 插入序列的偏移量= 0。 
           nitems - 删除> = 0的序列中的项目数。 
           BadLocationException - 如果参数覆盖的区域不包含在字符序列中,则抛出。 
           String getString(int where, int len) throws BadLocationException
where - 偏移到序列获取> = 0。 
           len - 要复制的 
            len数> = 0。 
           BadLocationException - 如果参数覆盖的区域不包含在字符序列中,则抛出。 
           void getChars(int where,
              int len,
              Segment txt)
       throws BadLocationException 
          where - 起始偏移量> = 0 
           len - 
            len数> = 0 
           txt - 要复制的目标位置 
           BadLocationException - 如果参数覆盖的区域不包含在字符序列中,则抛出。 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.