|
JavaTM Platform Standard Ed. 6 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object javax.swing.text.DocumentFilter.FilterBypass
public abstract static class DocumentFilter.FilterBypass
Document へのコールバックを回避して、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 Platform Standard Ed. 6 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。