java.lang.Object
javax.swing.undo.UndoableEditSupport
public class UndoableEditSupport extends Object
UndoableEdit
リスナーを管理するために使用するサポート・クラスです。-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected CompoundEdit
compoundEdit
コンパウンド編集。protected Vector<UndoableEditListener>
listeners
リスナーのリスト。protected Object
realSource
リアル・ソース。protected int
updateLevel
更新レベル。 -
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 UndoableEditSupport()
UndoableEditSupport
オブジェクトを構築します。UndoableEditSupport(Object r)
UndoableEditSupport
オブジェクトを構築します。 -
メソッドのサマリー
修飾子と型 メソッド 説明 protected void
_postEdit(UndoableEdit e)
postEdit
およびendUpdate
からのみ呼び出されます。void
addUndoableEditListener(UndoableEditListener l)
UndoableEditListener
を登録します。void
beginUpdate()
protected CompoundEdit
createCompoundEdit()
beginUpdate
からのみ呼び出されます。void
endUpdate()
デッドロック警告: このメソッドを呼び出すと、すべてのリスナーでundoableEditHappened
が呼び出されます。UndoableEditListener[]
getUndoableEditListeners()
addUndoableEditListener()によってこのUndoableEditSupportに追加されたすべてのUndoableEditListener
から成る配列を返します。int
getUpdateLevel()
更新レベルの値を返します。void
postEdit(UndoableEdit e)
デッドロック警告: このメソッドを呼び出すと、すべてのリスナーでundoableEditHappened
が呼び出されます。void
removeUndoableEditListener(UndoableEditListener l)
UndoableEditListener
を削除します。String
toString()
このオブジェクトのプロパティを表示および識別する文字列を返します。
-
フィールド詳細
-
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つから呼び出すのは良い方法ではありません。 -
toString
public String toString()このオブジェクトのプロパティを表示および識別する文字列を返します。
-