UndoRedo.Empty, UndoRedo.Managerpublic interface UndoRedo
UndoAction and RedoAction to listen to editing changes of active
components and to changes in their ability to do undo and redo.
Related links:
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
UndoRedo.Empty |
Deprecated.
Use
NONE rather than instantiating this. |
static class |
UndoRedo.Manager |
An undo manager which fires a change event each time it consumes a new undoable edit.
|
static interface |
UndoRedo.Provider |
Components that provide
UndoRedo shall announce that by
implementing this provider interface. |
| Modifier and Type | Field | Description |
|---|---|---|
static UndoRedo |
NONE |
Empty implementation that does not allow
any undo or redo actions.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l) |
Add a change listener.
|
boolean |
canRedo() |
Test whether the component currently has undone edits which may be redone.
|
boolean |
canUndo() |
Test whether the component currently has edits which may be undone.
|
java.lang.String |
getRedoPresentationName() |
Get a human-presentable name describing the
redo operation.
|
java.lang.String |
getUndoPresentationName() |
Get a human-presentable name describing the
undo operation.
|
void |
redo() |
Redo a previously undone edit.
|
void |
removeChangeListener(javax.swing.event.ChangeListener l) |
Remove a change listener.
|
void |
undo() |
Undo an edit.
|
static final UndoRedo NONE
boolean canUndo()
true if undo is allowedboolean canRedo()
true if redo is allowedvoid undo() throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException - if it failsvoid redo() throws javax.swing.undo.CannotRedoException
javax.swing.undo.CannotRedoException - if it failsvoid addChangeListener(javax.swing.event.ChangeListener l)
l - the listener to addvoid removeChangeListener(javax.swing.event.ChangeListener l)
l - the listener to removeaddChangeListener(javax.swing.event.ChangeListener)java.lang.String getUndoPresentationName()
java.lang.String getRedoPresentationName()
Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.