|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
編集可能な文字のシーケンスを示すインタフェースです。実装では、変更が UndoableEdit の実装を返すかどうかを反映する、履歴機構をサポートしてもしなくてもかまいません。
AbstractDocument| メソッドの概要 | |
Position |
createPosition(int offset)
コンテンツが変更されたときに変更を追跡するコンテンツ内の位置を作成します。 |
void |
getChars(int where,
int len,
Segment txt)
文字のシーケンスを取得して、セグメントにコピーします。 |
String |
getString(int where,
int len)
シーケンスに含まれる文字列を返します。 |
UndoableEdit |
insertString(int where,
String str)
シーケンスに文字列を挿入します。 |
int |
length()
文字シーケンスの、現在の長さです。 |
UndoableEdit |
remove(int where,
int nitems)
シーケンスの一部を削除します。 |
| メソッドの詳細 |
public Position createPosition(int offset)
throws BadLocationException
offset - コンテンツのオフセット >= 0
BadLocationException - オフセットが無効な場合public int length()
public UndoableEdit insertString(int where,
String str)
throws BadLocationException
where - 挿入するシーケンスまでのオフセット >= 0str - 挿入する文字列
Edit の実装への参照が返される。そうでない場合は null が返される
BadLocationException - 引数によって指定された領域が文字のシーケンスに含まれない場合はスローされる
public UndoableEdit remove(int where,
int nitems)
throws BadLocationException
where - 挿入するシーケンスまでのオフセット >= 0nitems - 削除対象となるシーケンス内の項目の数 >= 0
BadLocationException - 引数によって指定された領域が文字のシーケンスに含まれない場合はスローされる
public String getString(int where,
int len)
throws BadLocationException
where - 取得するシーケンスまでのオフセット >= 0len - コピーする文字数 >= 0
BadLocationException - 引数によって指定された領域が文字のシーケンスに含まれない場合はスローされる
public void getChars(int where,
int len,
Segment txt)
throws BadLocationException
where - 開始オフセット >= 0len - 文字数 >= 0txt - コピー先の位置
BadLocationException - 引数によって指定された領域が文字のシーケンスに含まれない場合はスローされる
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
Java、Java 2D、および JDBC は米国ならびにその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.