|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| 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
ch.randelshofer.undo.UndoRedoManager
public class UndoRedoManager
Same as javax.swing.UndoManager but provides actions for undo and redo operations.
| Field Summary | |
|---|---|
static javax.swing.undo.UndoableEdit |
DISCARD_ALL_EDITS
Sending this UndoableEdit event to the UndoRedoManager disables the Undo and Redo functions of the manager. |
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
UndoRedoManager()
Creates new UndoRedoManager |
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a change listener. |
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
If inProgress, inserts anEdit at indexOfNextAdd, and removes any old edits that were at indexOfNextAdd or later. |
void |
discardAllEdits()
Discards all edits. |
protected void |
fireStateChanged()
Notify all listeners that have registered interest for notification on this event type. |
javax.swing.Action |
getRedoAction()
Gets the redo action for use as a Redo menu item. |
javax.swing.Action |
getUndoAction()
Gets the undo action for use as an Undo menu item. |
boolean |
hasSignificantEdits()
Returns true if at least one significant UndoableEdit has been added since the last call to discardAllEdits. |
void |
redo()
Redoes the last undone edit event. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
|
void |
undo()
Undoes the last edit event. |
void |
undoOrRedo()
Undoes or redoes the last edit event. |
| Methods inherited from class javax.swing.undo.UndoManager |
|---|
canRedo, canUndo, canUndoOrRedo, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoTo |
| Methods inherited from class javax.swing.undo.CompoundEdit |
|---|
die, getPresentationName, isInProgress, isSignificant, lastEdit |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
replaceEdit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final javax.swing.undo.UndoableEdit DISCARD_ALL_EDITS
| Constructor Detail |
|---|
public UndoRedoManager()
| Method Detail |
|---|
public void discardAllEdits()
discardAllEdits in class javax.swing.undo.UndoManagerpublic boolean hasSignificantEdits()
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
If not inProgress, acts as a CompoundEdit
Regardless of inProgress, if undoOrRedoInProgress, calls die on each edit that is sent.
addEdit in interface javax.swing.undo.UndoableEditaddEdit in class javax.swing.undo.UndoManagerCompoundEdit.end(),
CompoundEdit.addEdit(javax.swing.undo.UndoableEdit)public javax.swing.Action getUndoAction()
public javax.swing.Action getRedoAction()
public void undo()
throws javax.swing.undo.CannotUndoException
undo in interface javax.swing.undo.UndoableEditundo in class javax.swing.undo.UndoManagerjavax.swing.undo.CannotUndoException
public void redo()
throws javax.swing.undo.CannotUndoException
redo in interface javax.swing.undo.UndoableEditredo in class javax.swing.undo.UndoManagerjavax.swing.undo.CannotUndoException
public void undoOrRedo()
throws javax.swing.undo.CannotUndoException,
javax.swing.undo.CannotRedoException
undoOrRedo in class javax.swing.undo.UndoManagerjavax.swing.undo.CannotUndoException
javax.swing.undo.CannotRedoExceptionpublic void addChangeListener(javax.swing.event.ChangeListener l)
hasSignificantEditspublic void removeChangeListener(javax.swing.event.ChangeListener l)
protected void fireStateChanged()
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||