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
-与插入的内容关联的属性。如果没有属性,这可能是空的。
BadLocationException
-给定的插入位置不在有效的文档位置
public abstract void replace(int offset, int length, String string, AttributeSet attrs) throws BadLocationException
offset
到
offset + length
,与
text
取代它。
offset
定位文档
length
长度的文本删除
string
文本插入,零表示没有文本插入
attrs
- attributeset指示插入的文本属性,空是合法的。
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.