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警告:调用此方法可能会在所有侦听器中调用undoableEditHappened。 | 
| UndoableEditListener[] | getUndoableEditListeners()
              返回使用addUndoableEditListener()添加到此UndoableEditSupport的所有 
              UndoableEditListener的数组。 | 
| int | getUpdateLevel()
              返回更新级别值。 
             | 
| void | postEdit(UndoableEdit e)undoableEditHappened警告:调用此方法可能会在所有侦听器中调用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的数组。 
          UndoableEditListener如果没有添加侦听器,则为空数组 
           protected void _postEdit(UndoableEdit e)
postEdit和endUpdate 。 
           电话undoableEditHappened在所有的听众。 
           这里不执行同步,因为两个调用方法是同步的。 
          public void postEdit(UndoableEdit e)
undoableEditHappened警告:调用此方法可能会在所有侦听器中调用undoableEditHappened。 
           从其中一个监听器调用此方法是不明智的。 
          public int getUpdateLevel()
public void beginUpdate()
protected CompoundEdit createCompoundEdit()
beginUpdate 。 
           暴露在这里用于子类的使用。 
          public void endUpdate()
undoableEditHappened警告:调用此方法可能会在所有侦听器中调用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.