public abstract static class DocumentFilter.FilterBypass extends Object
| Constructor and Description |
|---|
FilterBypass() |
| Modifier and Type | Method and Description |
|---|---|
abstract Document |
getDocument()
返回发生突变的文档。
|
abstract void |
insertString(int offset, String string, AttributeSet attr)
插入指定的文本,绕过DocumentFilter。
|
abstract void |
remove(int offset, int length)
删除指定的文本区域,绕过DocumentFilter。
|
abstract void |
replace(int offset, int length, String string, AttributeSet attrs)
将文本区域从
offset删除为
offset + length ,并将其替换为
text 。
|
public abstract Document getDocument()
public abstract void remove(int offset,
int length)
throws BadLocationException
offset - 从开始> = 0的偏移量
length - 要删除的字符数> = 0
BadLocationException - 删除范围的某些部分不是文档的有效部分。
异常中的位置是遇到的第一个坏位置。
public abstract void insertString(int offset,
String string,
AttributeSet attr)
throws BadLocationException
offset - 插入内容> = 0的文档的偏移量。在给定位置或之后跟踪更改的所有位置将移动。
string - 要插入的字符串
attr - 与插入的内容关联的属性。
如果没有属性,则可能为null。
BadLocationException - 给定的插入位置不是文档中的有效位置
public abstract void replace(int offset,
int length,
String string,
AttributeSet attrs)
throws BadLocationException
offset删除为
offset + length ,并将其替换为
text 。
offset - 文件中的位置
length - 要删除的文本长度
string - 要插入的文本,null表示不插入任何文本
attrs - 指示插入文本的属性的AttributeSet,null是合法的。
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.