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
-要复制的字符数> = 0。
BadLocationException
如果被争论的区域不包含在字符序列被。
void getChars(int where, int len, Segment txt) throws BadLocationException
where
-起始偏移> = 0
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.