public class AbstractDocument.DefaultDocumentEvent extends CompoundEdit implements DocumentEvent
DocumentEvent.ElementChange, DocumentEvent.EventTypeeditsRedoName, UndoName| Constructor and Description | 
|---|
| DefaultDocumentEvent(int offs, int len, DocumentEvent.EventType type)
              构建变更记录。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | addEdit(UndoableEdit anEdit)
              添加文档编辑。 
             | 
| DocumentEvent.ElementChange | getChange(Element elem)
              获取元素的更改。 
             | 
| Document | getDocument()
              获取来源于更改事件的文档。 
             | 
| int | getLength()
              返回更改的长度。 
             | 
| int | getOffset()
              返回变更开始文档中的偏移量。 
             | 
| String | getPresentationName()
              提供适用于(例如更改日志)的此编辑的本地化,可读取的描述。 
             | 
| String | getRedoPresentationName()
              提供本编辑的可重写形式的本地化,可读的描述,例如 
             | 
| DocumentEvent.EventType | getType()
              返回事件的类型。 
             | 
| String | getUndoPresentationName()
              提供这种编辑的可撤销形式的本地化,可读的描述,例如 
             | 
| boolean | isSignificant()
              DefaultDocument事件很重要。 
             | 
| void | redo()
              重做一个变化。 
             | 
| String | toString()
              返回更改事件的字符串描述。 
             | 
| void | undo()
              撤消更改。 
             | 
canRedo, canUndo, die, end, isInProgress, lastEditreplaceEditpublic DefaultDocumentEvent(int offs,
                            int len,
                            DocumentEvent.EventType type) 
          offs - 更改文档中的偏移量> = 0 
           len - 更改的长度> = 0 
           type - 事件的类型(DocumentEvent.EventType) 
           public String toString()
toString在 
            CompoundEdit类 
           public boolean addEdit(UndoableEdit anEdit)
addEdit在界面 
            UndoableEdit 
           addEdit在 
            CompoundEdit 
           anEdit - 文件编辑记录 
           UndoableEdit.addEdit(javax.swing.undo.UndoableEdit) 
           public void redo()
          throws CannotRedoException 
          redo在接口 
            UndoableEdit 
           redo在 
            CompoundEdit类 
           CannotRedoException - 如果更改无法重做 
           AbstractUndoableEdit.canRedo() 
           public void undo()
          throws CannotUndoException 
          undo在接口 
            UndoableEdit 
           undo在 
            CompoundEdit 
           CannotUndoException - 如果更改无法撤消 
           AbstractUndoableEdit.canUndo() 
           public boolean isSignificant()
isSignificant在接口 
            UndoableEdit 
           isSignificant在 
            CompoundEdit 
           UndoableEdit.isSignificant() 
           public String getPresentationName()
getPresentationName在界面 
            UndoableEdit 
           getPresentationName在 
            CompoundEdit 
           AbstractUndoableEdit.getUndoPresentationName() , 
            AbstractUndoableEdit.getRedoPresentationName() 
           public String getUndoPresentationName()
getUndoPresentationName在接口 
            UndoableEdit 
           getUndoPresentationName在 
            CompoundEdit类 
           AbstractUndoableEdit.getPresentationName() 
           public String getRedoPresentationName()
getRedoPresentationName在界面 
            UndoableEdit 
           getRedoPresentationName在 
            CompoundEdit 
           AbstractUndoableEdit.getPresentationName() 
           public DocumentEvent.EventType getType()
getType在接口 
            DocumentEvent 
           DocumentEvent.getType() 
           public int getOffset()
getOffset在接口 
            DocumentEvent 
           DocumentEvent.getOffset() 
           public int getLength()
getLength在接口 
            DocumentEvent 
           DocumentEvent.getLength() 
           public Document getDocument()
getDocument在界面 
            DocumentEvent 
           DocumentEvent.getDocument() 
           public DocumentEvent.ElementChange getChange(Element elem)
getChange在界面 
            DocumentEvent 
           elem - 元素 
            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.