edu.princeton.swing
public class ActionedUndoManager extends javax.swing.undo.UndoManager
Modifier and Type | Class and Description |
---|---|
protected class |
ActionedUndoManager.RedoAction
RedoAction is an action which calls the redo() method of its ActionedUndoManager.
|
protected class |
ActionedUndoManager.UndoAction
UndoAction is an action which calls the undo() method of its ActionedUndoManager.
|
Modifier and Type | Field and Description |
---|---|
static javax.swing.Icon |
REDO_ICON
The redo icon.
|
static byte[] |
REDO_ICON_BYTES
The bytes for the redo icon.
|
static javax.swing.Icon |
UNDO_ICON
The undo icon.
|
static byte[] |
UNDO_ICON_BYTES
The bytes for the undo icon.
|
Constructor and Description |
---|
ActionedUndoManager()
Creates a new ActionedUndoManager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
Intercept all calls that could affect the undo/redo action states.
|
void |
discardAllEdits()
Intercept all calls that could affect the undo/redo action states.
|
void |
end()
Intercept all calls that could affect the undo/redo action states.
|
AbstractAction2 |
getRedoAction()
Returns an action that calls the redo method of this ActionedUndoManager.
|
AbstractAction2 |
getUndoAction()
Returns an action that calls the undo method of this ActionedUndoManager.
|
void |
redo()
Intercept all calls that could affect the undo/redo action states.
|
protected void |
redoTo(javax.swing.undo.UndoableEdit edit)
Intercept all calls that could affect the undo/redo action states.
|
boolean |
replaceEdit(javax.swing.undo.UndoableEdit anEdit)
Intercept all calls that could affect the undo/redo action states.
|
void |
setLimit(int l)
Intercept all calls that could affect the undo/redo action states.
|
protected void |
trimEdits(int from,
int to)
Intercept all calls that could affect the undo/redo action states.
|
protected void |
trimForLimit()
Intercept all calls that could affect the undo/redo action states.
|
void |
undo()
Intercept all calls that could affect the undo/redo action states.
|
void |
undoableEditHappened(javax.swing.event.UndoableEditEvent e)
Intercept all calls that could affect the undo/redo action states.
|
void |
undoOrRedo()
Intercept all calls that could affect the undo/redo action states.
|
protected void |
undoTo(javax.swing.undo.UndoableEdit edit)
Intercept all calls that could affect the undo/redo action states.
|
canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, toString
public static final byte[] UNDO_ICON_BYTES
public static final javax.swing.Icon UNDO_ICON
public static final byte[] REDO_ICON_BYTES
public static final javax.swing.Icon REDO_ICON
public ActionedUndoManager()
public AbstractAction2 getUndoAction()
public AbstractAction2 getRedoAction()
public void discardAllEdits()
discardAllEdits
in class javax.swing.undo.UndoManager
protected void trimForLimit()
trimForLimit
in class javax.swing.undo.UndoManager
protected void trimEdits(int from, int to)
trimEdits
in class javax.swing.undo.UndoManager
public void setLimit(int l)
setLimit
in class javax.swing.undo.UndoManager
protected void undoTo(javax.swing.undo.UndoableEdit edit) throws javax.swing.undo.CannotUndoException
undoTo
in class javax.swing.undo.UndoManager
javax.swing.undo.CannotUndoException
protected void redoTo(javax.swing.undo.UndoableEdit edit) throws javax.swing.undo.CannotRedoException
redoTo
in class javax.swing.undo.UndoManager
javax.swing.undo.CannotRedoException
public void undoOrRedo() throws javax.swing.undo.CannotRedoException, javax.swing.undo.CannotUndoException
undoOrRedo
in class javax.swing.undo.UndoManager
javax.swing.undo.CannotRedoException
javax.swing.undo.CannotUndoException
public void undo() throws javax.swing.undo.CannotUndoException
undo
in interface javax.swing.undo.UndoableEdit
undo
in class javax.swing.undo.UndoManager
javax.swing.undo.CannotUndoException
public void redo() throws javax.swing.undo.CannotRedoException
redo
in interface javax.swing.undo.UndoableEdit
redo
in class javax.swing.undo.UndoManager
javax.swing.undo.CannotRedoException
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
addEdit
in interface javax.swing.undo.UndoableEdit
addEdit
in class javax.swing.undo.UndoManager
public void end()
end
in class javax.swing.undo.UndoManager
public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
undoableEditHappened
in interface javax.swing.event.UndoableEditListener
undoableEditHappened
in class javax.swing.undo.UndoManager
public boolean replaceEdit(javax.swing.undo.UndoableEdit anEdit)
replaceEdit
in interface javax.swing.undo.UndoableEdit
replaceEdit
in class javax.swing.undo.AbstractUndoableEdit