|
|||||||||
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.undo.UndoManager
edu.princeton.swing.ActionedUndoManager
public class ActionedUndoManager
ActionedUndoManager extends UndoManager to provide usable Action objects for the undo and redo properties.
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
static Icon |
REDO_ICON
The redo icon. |
static byte[] |
REDO_ICON_BYTES
The bytes for the redo icon. |
static Icon |
UNDO_ICON
The undo icon. |
static byte[] |
UNDO_ICON_BYTES
The bytes for the undo icon. |
Fields inherited from class javax.swing.undo.CompoundEdit |
---|
edits |
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
---|
RedoName, UndoName |
Constructor Summary | |
---|---|
ActionedUndoManager()
Creates a new ActionedUndoManager. |
Method Summary | |
---|---|
boolean |
addEdit(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(UndoableEdit edit)
Intercept all calls that could affect the undo/redo action states. |
boolean |
replaceEdit(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(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(UndoableEdit edit)
Intercept all calls that could affect the undo/redo action states. |
Methods inherited from class javax.swing.undo.UndoManager |
---|
canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, toString |
Methods inherited from class javax.swing.undo.CompoundEdit |
---|
die, getPresentationName, isInProgress, isSignificant, lastEdit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte[] UNDO_ICON_BYTES
public static final Icon UNDO_ICON
public static final byte[] REDO_ICON_BYTES
public static final Icon REDO_ICON
Constructor Detail |
---|
public ActionedUndoManager()
Method Detail |
---|
public AbstractAction2 getUndoAction()
public AbstractAction2 getRedoAction()
public void discardAllEdits()
discardAllEdits
in class UndoManager
protected void trimForLimit()
trimForLimit
in class UndoManager
protected void trimEdits(int from, int to)
trimEdits
in class UndoManager
public void setLimit(int l)
setLimit
in class UndoManager
protected void undoTo(UndoableEdit edit) throws CannotUndoException
undoTo
in class UndoManager
CannotUndoException
protected void redoTo(UndoableEdit edit) throws CannotRedoException
redoTo
in class UndoManager
CannotRedoException
public void undoOrRedo() throws CannotRedoException, CannotUndoException
undoOrRedo
in class UndoManager
CannotRedoException
CannotUndoException
public void undo() throws CannotUndoException
undo
in interface UndoableEdit
undo
in class UndoManager
CannotUndoException
public void redo() throws CannotRedoException
redo
in interface UndoableEdit
redo
in class UndoManager
CannotRedoException
public boolean addEdit(UndoableEdit anEdit)
addEdit
in interface UndoableEdit
addEdit
in class UndoManager
public void end()
end
in class UndoManager
public void undoableEditHappened(UndoableEditEvent e)
undoableEditHappened
in interface UndoableEditListener
undoableEditHappened
in class UndoManager
public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit
in interface UndoableEdit
replaceEdit
in class AbstractUndoableEdit
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |