public class UndoableEditSupport extends Object
UndoableEdit
听众。
Modifier and Type | Field and Description |
---|---|
protected CompoundEdit |
compoundEdit |
protected Vector<UndoableEditListener> |
listeners |
protected Object |
realSource |
protected int |
updateLevel |
Constructor and Description |
---|
UndoableEditSupport()
构建了一个
UndoableEditSupport 对象。
|
UndoableEditSupport(Object r)
构建了一个
UndoableEditSupport 对象。
|
Modifier and Type | Method and Description |
---|---|
protected void |
_postEdit(UndoableEdit e)
只有从
postEdit 和
endUpdate 叫。
|
void |
addUndoableEditListener(UndoableEditListener l)
注册一个
UndoableEditListener 。
|
void |
beginUpdate() |
protected CompoundEdit |
createCompoundEdit()
只有从
beginUpdate 叫。
|
void |
endUpdate()
僵局警告:调用此方法,可以叫
undoableEditHappened 所有听众。
|
UndoableEditListener[] |
getUndoableEditListeners()
返回所有的
UndoableEditListener s数组添加到这个undoableeditsupport与addundoableeditlistener()。
|
int |
getUpdateLevel()
返回更新级值。
|
void |
postEdit(UndoableEdit e)
僵局警告:调用此方法,可以叫
undoableEditHappened 所有听众。
|
void |
removeUndoableEditListener(UndoableEditListener l)
删除一个
UndoableEditListener 。
|
String |
toString()
返回显示并标识该对象属性的字符串。
|
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
s数组添加到这个undoableeditsupport与addundoableeditlistener()。
UndoableEditListener
s说如果没有听众已添加一个空数组
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
所有听众。从它的一个侦听器中调用这个方法是不明智的。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.