| Package | Description |
|---|---|
| javax.swing.event |
Provides for events fired by Swing components.
|
| javax.swing.text |
Provides classes and interfaces that deal with editable and noneditable text components.
|
| javax.swing.undo |
Allows developers to provide support for undo/redo in applications such as text editors.
|
| Modifier and Type | Method and Description |
|---|---|
UndoableEdit |
UndoableEditEvent.getEdit()
Returns the edit value.
|
| Constructor and Description | |
|---|---|
UndoableEditEvent(Object
Constructs an UndoableEditEvent object.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractDocument
Stores document changes as the document is being modified.
|
static class |
AbstractDocument
An implementation of ElementChange that can be added to the document event.
|
static class |
DefaultStyledDocument
An UndoableEdit used to remember AttributeSet changes to an Element.
|
| Modifier and Type | Method and Description |
|---|---|
UndoableEdit |
StringContent.insertString(int where, String
Inserts a string into the content.
|
UndoableEdit |
AbstractDocument.Content.insertString(int where, String
Inserts a string of characters into the sequence.
|
UndoableEdit |
GapContent.insertString(int where, String
Inserts a string into the content.
|
UndoableEdit |
StringContent.remove(int where, int nitems)
Removes part of the content.
|
UndoableEdit |
AbstractDocument.Content.remove(int where, int nitems)
Removes some portion of the sequence.
|
UndoableEdit |
GapContent.remove(int where, int nitems)
Removes part of the content.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
AbstractDocument.DefaultDocumentEvent.addEdit(UndoableEdit
Adds a document edit.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractUndoableEdit
An abstract implementation of
UndoableEdit, implementing simple responses to all boolean methods in that interface.
|
class |
CompoundEdit
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.
|
class |
StateEdit
StateEdit is a general edit for objects that change state.
|
class |
UndoManager
UndoManager manages a list of
UndoableEdits, providing a way to undo or redo the appropriate edits.
|
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
CompoundEdit.edits
The collection of
UndoableEdits undone/redone en masse by this
CompoundEdit.
|
| Modifier and Type | Method and Description |
|---|---|
protected UndoableEdit |
UndoManager.editToBeRedone()
Returns the the next significant edit to be redone if
redo is invoked.
|
protected UndoableEdit |
UndoManager.editToBeUndone()
Returns the the next significant edit to be undone if
undo is invoked.
|
protected UndoableEdit |
CompoundEdit.lastEdit()
Returns the last
UndoableEdit in
edits, or
null if
edits is empty.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
UndoableEditSupport._postEdit(UndoableEdit
Called only from
postEdit and
endUpdate.
|
boolean |
AbstractUndoableEdit.addEdit(UndoableEdit
This default implementation returns false.
|
boolean |
UndoableEdit.addEdit(UndoableEdit
Adds an
UndoableEdit to this
UndoableEdit.
|
boolean |
UndoManager.addEdit(UndoableEdit
Adds an
UndoableEdit to this
UndoManager, if it's possible.
|
boolean |
CompoundEdit.addEdit(UndoableEdit
If this edit is
inProgress, accepts
anEdit and returns true.
|
void |
UndoableEditSupport.postEdit(UndoableEdit
DEADLOCK WARNING: Calling this method may call
undoableEditHappened in all listeners.
|
protected void |
UndoManager.redoTo(UndoableEdit
Redoes all changes from the index of the next edit to
edit, updating the index of the next edit appropriately.
|
boolean |
AbstractUndoableEdit.replaceEdit(UndoableEdit
This default implementation returns false.
|
boolean |
UndoableEdit.replaceEdit(UndoableEdit
Returns true if this
UndoableEdit should replace
anEdit.
|
protected void |
UndoManager.undoTo(UndoableEdit
Undoes all changes from the index of the next edit to
edit, updating the index of the next edit appropriately.
|