java.lang.Objectjavax.swing.undo.UndoableEditSupport
public class UndoableEditSupport
用于管理 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() 返回显示和标识此对象属性的字符串。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
protected int updateLevel
protected CompoundEdit compoundEdit
protected Vector<UndoableEditListener> listeners
protected Object realSource
| 构造方法详细信息 |
|---|
public UndoableEditSupport()
UndoableEditSupport 对象。
public UndoableEditSupport(Object r)
UndoableEditSupport 对象。
r - 一个
Object
| 方法详细信息 |
|---|
public void addUndoableEditListener(UndoableEditListener l)
UndoableEditListener。每当可撤消的编辑产生时就通知侦听器。
l - 一个
UndoableEditListener 对象
removeUndoableEditListener(javax.swing.event.UndoableEditListener)
public void removeUndoableEditListener(UndoableEditListener l)
UndoableEditListener。
l - 要移除的
UndoableEditListener
addUndoableEditListener(javax.swing.event.UndoableEditListener)
public UndoableEditListener[] getUndoableEditListeners()
UndoableEditListener 组成的数组。
UndoableEditListener,如果没有添加侦听器,则返回一个空数组
protected void _postEdit(UndoableEdit e)
postEdit 和
endUpdate 调用。调用所有侦听器中的
undoableEditHappened。此处不执行同步,因为两个调用方法已同步。
public void postEdit(UndoableEdit e)
undoableEditHappened。从它的一个侦听器中调用此方法是不明智的。
public int getUpdateLevel()
public void beginUpdate()
protected CompoundEdit createCompoundEdit()
beginUpdate 调用。在此处公开供子类使用。
public void endUpdate()
undoableEditHappened。从它的一个侦听器中调用此方法是不明智的。
public String toString()