public class AbstractDocument.DefaultDocumentEvent
Stores document changes as the document is being
modified.
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.
See also:
Constructors
public AbstractDocument.DefaultDocumentEvent
(int offs, int len, EventType type)
Constructs a change record.
Constructs a change record.
Parameters: - offs - the offset into the document of the change >= 0
- len - the length of the change >= 0
- type - the type of event (DocumentEvent.EventType)
Since:
1.4
Adds a document edit. If the number of edits crosses a threshold, this switches on a hashtable lookup for ElementChange implementations since access of these needs to be relatively quick.
Returns:
true if the edit was added
Parameters: - anEdit - a document edit record
public boolean
canRedo
()
[Inherited From CompoundEdit]
Returns false if isInProgress or if super
returns false.
Provides a localized, human readable description of the redoable
form of this edit, e.g.
Provides a localized, human readable description of the redoable form of this edit, e.g. for use as a Redo menu item. Typically derived from getPresentationName();
Returns:
the description
Provides a localized, human readable description of the undoable
form of this edit, e.g.
Provides a localized, human readable description of the undoable form of this edit, e.g. for use as an Undo menu item. Typically derived from getDescription();
Returns:
the description
public boolean
isInProgress
()
[Inherited From CompoundEdit]
Returns true if this edit is in progress--that is, it has not
received end.
Returns true if this edit is in progress--that is, it has not received end. This generally means that edits are still being added to it.
See Also:CompoundEdit.end(),
public boolean
isSignificant
()
[Overrides CompoundEdit]
DefaultDocument events are significant.
DefaultDocument events are significant. If you wish to aggregate DefaultDocumentEvents to present them as a single edit to the user place them into a CompoundEdit.
Returns:
whether the event is significant for edit undo purposes
String returned by getRedoPresentationName;
as of Java 2 platform v1.3.1 this field is no longer used.
String returned by getRedoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used. This value is now localized and comes from the defaults table with key AbstractUndoableEdit.redoText.
See Also:UIDefaults,
String returned by getUndoPresentationName;
as of Java 2 platform v1.3.1 this field is no longer used.
String returned by getUndoPresentationName; as of Java 2 platform v1.3.1 this field is no longer used. This value is now localized and comes from the defaults table with key AbstractUndoableEdit.undoText.
See Also:UIDefaults,