|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjavax.swing.text.DocumentFilter.FilterBypass
public abstract static class DocumentFilter.FilterBypass
充當避開回調 Document 進行更改的方法。希望支持 DocumentFilter 的 Document 實作必須提供一種實作,以便在從 DocumentFilter 調用下列方法時不回調 DocumentFilter。
| 建構子摘要 | |
|---|---|
DocumentFilter.FilterBypass()
|
|
| 方法摘要 | |
|---|---|
abstract Document |
getDocument()
返回發生變化的 Document。 |
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 替換。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 建構子詳細資訊 |
|---|
public DocumentFilter.FilterBypass()
| 方法詳細資訊 |
|---|
public abstract Document getDocument()
public abstract void remove(int offset,
int length)
throws BadLocationException
offset - 起始位置的偏移量,該值 >= 0length - 要移除的字元數,該值 >= 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 - Document 中的位置length - 要刪除的文本長度string - 要插入的文本,null 指示沒有要插入的文本attrs - 指示插入文本屬性的 AttributeSet,null 也合法。
BadLocationException - 給定的插入位置不是文檔中的有效位置
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。