|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.undo.AbstractUndoableEdit
|
+--javax.swing.undo.CompoundEdit
|
+--javax.swing.text.AbstractDocument.DefaultDocumentEvent
Stores document changes as the document is being modified. Can subsequently be used for change notification when done with the document modification transaction. This is used by the AbstractDocument class and its extensions for broadcasting change information to the document listeners.
| Inner classes inherited from class javax.swing.event.DocumentEvent |
DocumentEvent.ElementChange, DocumentEvent.EventType |
| Fields inherited from class javax.swing.undo.CompoundEdit |
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
RedoName, UndoName |
| Constructor Summary | |
AbstractDocument.DefaultDocumentEvent(int offs,
int len,
DocumentEvent.EventType type)
Constructs a change record. |
|
| Method Summary | |
boolean |
addEdit(UndoableEdit anEdit)
Adds a document edit. |
DocumentEvent.ElementChange |
getChange(Element elem)
Gets the changes for an element. |
Document |
getDocument()
Gets the document that sourced the change event. |
int |
getLength()
Returns the length of the change. |
int |
getOffset()
Returns the offset within the document of the start of the change. |
String |
getPresentationName()
Provides a localized, human readable description of this edit suitable for use in, say, a change log. |
String |
getRedoPresentationName()
Provides a localized, human readable description of the redoable form of this edit, e.g. |
DocumentEvent.EventType |
getType()
Returns the type of event. |
String |
getUndoPresentationName()
Provides a localized, human readable description of the undoable form of this edit, e.g. |
boolean |
isSignificant()
DefaultDocument events are significant. |
void |
redo()
Redoes a change. |
String |
toString()
Returns a string description of the change event. |
void |
undo()
Undoes a change. |
| Methods inherited from class javax.swing.undo.CompoundEdit |
canRedo, canUndo, die, end, isInProgress, lastEdit |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
replaceEdit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AbstractDocument.DefaultDocumentEvent(int offs,
int len,
DocumentEvent.EventType type)
offs - the offset into the document of the change >= 0len - the length of the change >= 0type - the type of event (DocumentEvent.EventType)| Method Detail |
public String toString()
toString in class CompoundEditpublic boolean addEdit(UndoableEdit anEdit)
addEdit in class CompoundEditanEdit - a document edit record
public void redo()
throws CannotRedoException
redo in class CompoundEditCannotRedoException - if the change cannot be redone
public void undo()
throws CannotUndoException
undo in class CompoundEditCannotUndoException - if the change cannot be undonepublic boolean isSignificant()
isSignificant in class CompoundEditpublic String getPresentationName()
getPresentationName in class CompoundEditpublic String getUndoPresentationName()
getUndoPresentationName in class CompoundEditpublic String getRedoPresentationName()
getRedoPresentationName in class CompoundEditpublic DocumentEvent.EventType getType()
getType in interface DocumentEventDocumentEvent.getType()public int getOffset()
getOffset in interface DocumentEventDocumentEvent.getOffset()public int getLength()
getLength in interface DocumentEventDocumentEvent.getLength()public Document getDocument()
getDocument in interface DocumentEventDocumentEvent.getDocument()public DocumentEvent.ElementChange getChange(Element elem)
getChange in interface DocumentEventelem - the element
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.