|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.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 2 Platform Standard Ed. 5.0 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。