- java.lang.Object
-
- javax.swing.undo.UndoableEditSupport
-
public class UndoableEditSupport extends Object
UndoableEditリスナーを管理するために使用するサポート・クラスです。
-
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected CompoundEditcompoundEditコンパウンド編集。protected Vector<UndoableEditListener>listenersリスナーのリスト。protected ObjectrealSourceリアル・ソース。protected intupdateLevel更新レベル。
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 UndoableEditSupport()UndoableEditSupportオブジェクトを構築します。UndoableEditSupport(Object r)UndoableEditSupportオブジェクトを構築します。
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 protected void_postEdit(UndoableEdit e)postEditおよびendUpdateからのみ呼び出されます。voidaddUndoableEditListener(UndoableEditListener l)UndoableEditListenerを登録します。voidbeginUpdate()protected CompoundEditcreateCompoundEdit()beginUpdateからのみ呼び出されます。voidendUpdate()デッドロック警告: このメソッドを呼び出すと、すべてのリスナーでundoableEditHappenedが呼び出されます。UndoableEditListener[]getUndoableEditListeners()addUndoableEditListener()によってこのUndoableEditSupportに追加されたすべてのUndoableEditListenerから成る配列を返します。intgetUpdateLevel()更新レベルの値を返します。voidpostEdit(UndoableEdit e)デッドロック警告: このメソッドを呼び出すと、すべてのリスナーでundoableEditHappenedが呼び出されます。voidremoveUndoableEditListener(UndoableEditListener l)UndoableEditListenerを削除します。StringtoString()このオブジェクトのプロパティを表示および識別する文字列を返します。
-
-
-
フィールドの詳細
-
updateLevel
protected int updateLevel
更新レベル。
-
compoundEdit
protected CompoundEdit compoundEdit
コンパウンド編集。
-
listeners
protected Vector<UndoableEditListener> listeners
リスナーのリスト。
-
realSource
protected Object realSource
リアル・ソース。
-
-
コンストラクタの詳細
-
UndoableEditSupport
public UndoableEditSupport()
UndoableEditSupportオブジェクトを構築します。
-
UndoableEditSupport
public UndoableEditSupport(Object r)
UndoableEditSupportオブジェクトを構築します。- パラメータ:
r-Object
-
-
メソッドの詳細
-
addUndoableEditListener
public void addUndoableEditListener(UndoableEditListener l)
UndoableEditListenerを登録します。 元に戻すことのできる編集が発生すると、必ずリスナーに通知されます。- パラメータ:
l-UndoableEditListenerオブジェクト- 関連項目:
removeUndoableEditListener(javax.swing.event.UndoableEditListener)
-
removeUndoableEditListener
public void removeUndoableEditListener(UndoableEditListener l)
UndoableEditListenerを削除します。- パラメータ:
l- 削除するUndoableEditListenerオブジェクト- 関連項目:
addUndoableEditListener(javax.swing.event.UndoableEditListener)
-
getUndoableEditListeners
public UndoableEditListener[] getUndoableEditListeners()
addUndoableEditListener()によってこのUndoableEditSupportに追加されたすべてのUndoableEditListenerから成る配列を返します。- 戻り値:
- 追加されたすべての
UndoableEditListener。リスナーが追加されていない場合は空の配列 - 導入されたバージョン:
- 1.4
-
_postEdit
protected void _postEdit(UndoableEdit e)
postEditおよびendUpdateからのみ呼び出されます。 すべてのリスナーでundoableEditHappenedを呼び出します。 2つの呼出し側メソッドは同期をとられるので、ここで同期は実行されません。- パラメータ:
e- 確認するために編集
-
postEdit
public void postEdit(UndoableEdit e)
デッドロック警告: このメソッドを呼び出すと、すべてのリスナーでundoableEditHappenedが呼び出されます。 このメソッドをそのリスナーの1つから呼び出すのは良い方法ではありません。- パラメータ:
e- 投稿を編集
-
getUpdateLevel
public int getUpdateLevel()
更新レベルの値を返します。- 戻り値:
- 更新レベルを表す整数値
-
beginUpdate
public void beginUpdate()
-
createCompoundEdit
protected CompoundEdit createCompoundEdit()
beginUpdateからのみ呼び出されます。 サブクラスで使用するために、ここに公開されています。- 戻り値:
- 新しく作成された
CompoundEditオブジェクト
-
endUpdate
public void endUpdate()
デッドロック警告: このメソッドを呼び出すと、すべてのリスナーでundoableEditHappenedが呼び出されます。 このメソッドをそのリスナーの1つから呼び出すのは良い方法ではありません。
-
-