|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.text.AbstractDocument.DefaultDocumentEvent
public class AbstractDocument.DefaultDocumentEvent
Stores the changes when a Document is beeing modified.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.swing.event.DocumentEvent |
|---|
DocumentEvent.ElementChange, DocumentEvent.EventType |
| Field Summary |
|---|
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
AbstractDocument.DefaultDocumentEvent(int offset,
int length,
DocumentEvent.EventType type)
Creates a new DefaultDocumentEvent. |
|
| Method Summary | |
|---|---|
boolean |
addEdit(UndoableEdit edit)
Adds an UndoableEdit to this DocumentEvent. |
DocumentEvent.ElementChange |
getChange(Element elem)
Returns the changes for an element. |
Document |
getDocument()
Returns the document that has been modified. |
int |
getLength()
Returns the length of the modification. |
int |
getOffset()
Returns the start offset of the modification. |
DocumentEvent.EventType |
getType()
Returns the type of the modification. |
String |
toString()
Returns a String description of the change event. |
| Methods inherited from class javax.swing.undo.CompoundEdit |
|---|
canRedo, canUndo, die, end, getPresentationName, getRedoPresentationName, getUndoPresentationName, isInProgress, isSignificant, lastEdit, redo, undo |
| 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 offset,
int length,
DocumentEvent.EventType type)
DefaultDocumentEvent.
offset - the starting offset of the changelength - the length of the changetype - the type of change| Method Detail |
|---|
public boolean addEdit(UndoableEdit edit)
DocumentEvent. If this
edit is an instance of AbstractDocument.ElementEdit, then this record can
later be fetched by calling getChange(javax.swing.text.Element).
addEdit in interface UndoableEditaddEdit in class CompoundEditedit - the undoable edit to add
true if edit could somehow be
incorporated; false if edit has not
been incorporated because CompoundEdit.end() was called before.public Document getDocument()
getDocument in interface DocumentEventpublic int getLength()
getLength in interface DocumentEventpublic int getOffset()
getOffset in interface DocumentEventpublic DocumentEvent.EventType getType()
getType in interface DocumentEventpublic DocumentEvent.ElementChange getChange(Element elem)
getChange in interface DocumentEventelem - the element for which the changes are requested
elem or null if
elem has not been changedpublic String toString()
toString in class CompoundEditObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||