java.lang.Object
javax.swing.undo.UndoableEditSupport
用于管理
UndoableEdit 监听器的支持类。
-
字段摘要
字段修饰符和类型Field描述protected CompoundEdit复合编辑。protected Vector<UndoableEditListener>听众名单。protected Object真正的来源。protected int更新级别。 -
构造方法总结
构造方法构造方法描述构造一个UndoableEditSupport对象.构造一个UndoableEditSupport对象. -
方法总结
修饰符和类型方法描述protected void仅从postEdit和endUpdate调用。void注册一个UndoableEditListener。void开始复合编辑更新。protected CompoundEdit仅从beginUpdate调用。void死锁警告:调用此方法可能会在所有监听器中调用undoableEditHappened。返回使用 addUndoableEditListener() 添加到此 UndoableEditSupport 的所有UndoableEditListener的数组。int返回更新级别值。void死锁警告:调用此方法可能会在所有监听器中调用undoableEditHappened。void删除UndoableEditListener。toString()返回显示和标识此对象属性的字符串。
-
字段详细信息
-
updateLevel
protected int updateLevel更新级别。 -
compoundEdit
复合编辑。 -
listeners
听众名单。 -
realSource
真正的来源。
-
-
构造方法详细信息
-
UndoableEditSupport
public UndoableEditSupport()构造一个UndoableEditSupport对象. -
UndoableEditSupport
构造一个UndoableEditSupport对象.- 参数:
r- 一个Object
-
-
方法详情
-
addUndoableEditListener
注册一个UndoableEditListener。每当发生可以撤消的编辑时,都会通知监听器。- 参数:
l- 一个UndoableEditListener对象- 参见:
-
removeUndoableEditListener
删除UndoableEditListener。- 参数:
l- 要删除的UndoableEditListener对象- 参见:
-
getUndoableEditListeners
返回使用 addUndoableEditListener() 添加到此 UndoableEditSupport 的所有UndoableEditListener的数组。- 返回:
-
添加所有
UndoableEditListeners,如果没有添加任何监听器,则为空数组 - 自从:
- 1.4
-
_postEdit
仅从postEdit和endUpdate调用。在所有监听器中调用undoableEditHappened。这里不执行同步,因为两个调用方法是同步的。- 参数:
e- 编辑待验证
-
postEdit
死锁警告:调用此方法可能会在所有监听器中调用undoableEditHappened。从其监听器之一调用此方法是不明智的。- 参数:
e- 编辑待发布
-
getUpdateLevel
public int getUpdateLevel()返回更新级别值。- 返回:
- 表示更新级别的整数
-
beginUpdate
public void beginUpdate()开始复合编辑更新。 -
createCompoundEdit
仅从beginUpdate调用。在这里公开供子类使用。- 返回:
-
新创建的
CompoundEdit对象
-
endUpdate
public void endUpdate()死锁警告:调用此方法可能会在所有监听器中调用undoableEditHappened。从其监听器之一调用此方法是不明智的。 -
toString
返回显示和标识此对象属性的字符串。
-