|
||||||||||
| 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
org.fife.ui.rtextarea.RUndoManager
public class RUndoManager
This class manages undos/redos for a particular editor pane. It groups all undos that occur one character position apart together, to avoid Java's horrible "one character at a time" undo behavior. It also recognizes "replace" actions (i.e., text is selected, then the user types), and treats it as a single action, instead of a remove/insert action pair.
| Field Summary |
|---|
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
RUndoManager(RTextArea textArea)
Constructor. |
|
| Method Summary | |
|---|---|
void |
beginInternalAtomicEdit()
Begins an "atomic" edit. |
void |
endInternalAtomicEdit()
Ends an "atomic" edit. |
String |
getCantRedoText()
Returns the localized "Can't Redo" string. |
String |
getCantUndoText()
Returns the localized "Can't Undo" string. |
void |
redo()
|
void |
undo()
|
void |
undoableEditHappened(UndoableEditEvent e)
|
void |
updateActions()
Ensures that undo/redo actions are enabled appropriately and have descriptive text at all times. |
| Methods inherited from class javax.swing.undo.UndoManager |
|---|
addEdit, canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoOrRedo, 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 |
| Constructor Detail |
|---|
public RUndoManager(RTextArea textArea)
textArea - The parent text area.| Method Detail |
|---|
public void beginInternalAtomicEdit()
endInternalAtomicEdit()public void endInternalAtomicEdit()
beginInternalAtomicEdit()public String getCantRedoText()
getCantUndoText()public String getCantUndoText()
getCantRedoText()
public void redo()
throws CannotRedoException
redo in interface UndoableEditredo in class UndoManagerCannotRedoException
public void undo()
throws CannotUndoException
undo in interface UndoableEditundo in class UndoManagerCannotUndoExceptionpublic void undoableEditHappened(UndoableEditEvent e)
undoableEditHappened in interface UndoableEditListenerundoableEditHappened in class UndoManagerpublic void updateActions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||