|
org.openide.awt 7.55.1 | |||||||||
| 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.openide.awt.UndoRedo.Manager
public static class UndoRedo.Manager
An undo manager which fires a change event each time it consumes a new undoable edit.
Compared to Swing this implementation is more stable.
If any contained undo edit throws an exception from its undo/redo methods
the implementation will fail gracefully (unlike in Swing it will not change
an internal pointer inside edits).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.openide.awt.UndoRedo |
|---|
UndoRedo.Empty, UndoRedo.Manager, UndoRedo.Provider |
| Field Summary |
|---|
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Fields inherited from interface org.openide.awt.UndoRedo |
|---|
NONE |
| Constructor Summary | |
|---|---|
UndoRedo.Manager()
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener l)
Add a change listener. |
boolean |
addEdit(UndoableEdit anEdit)
|
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. |
boolean |
canUndoOrRedo()
|
void |
die()
|
void |
discardAllEdits()
|
protected UndoableEdit |
editToBeRedone()
|
protected UndoableEdit |
editToBeUndone()
|
void |
end()
|
int |
getLimit()
|
String |
getPresentationName()
|
String |
getRedoPresentationName()
Get a human-presentable name describing the redo operation. |
String |
getUndoOrRedoPresentationName()
|
String |
getUndoPresentationName()
Get a human-presentable name describing the undo operation. |
boolean |
isInProgress()
|
boolean |
isSignificant()
|
protected UndoableEdit |
lastEdit()
|
void |
redo()
Redo a previously undone edit. |
protected void |
redoTo(UndoableEdit edit)
|
void |
removeChangeListener(ChangeListener l)
Remove a change listener. |
boolean |
replaceEdit(UndoableEdit anEdit)
|
void |
setLimit(int l)
|
String |
toString()
|
protected void |
trimEdits(int from,
int to)
|
protected void |
trimForLimit()
|
void |
undo()
Undo an edit. |
void |
undoableEditHappened(UndoableEditEvent ue)
Consume an undoable edit. |
void |
undoOrRedo()
|
protected void |
undoTo(UndoableEdit edit)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UndoRedo.Manager()
| Method Detail |
|---|
public void die()
die in interface UndoableEditdie in class CompoundEditpublic boolean isInProgress()
isInProgress in class CompoundEditpublic void end()
end in class UndoManager
public void undo()
throws CannotUndoException
UndoRedo
undo in interface UndoableEditundo in interface UndoRedoundo in class UndoManagerCannotUndoException - if it fails
protected void undoTo(UndoableEdit edit)
throws CannotUndoException
undoTo in class UndoManagerCannotUndoExceptionpublic boolean canUndo()
UndoRedo
canUndo in interface UndoableEditcanUndo in interface UndoRedocanUndo in class UndoManagertrue if undo is allowed
public void redo()
throws CannotRedoException
UndoRedo
redo in interface UndoableEditredo in interface UndoRedoredo in class UndoManagerCannotRedoException - if it fails
protected void redoTo(UndoableEdit edit)
throws CannotRedoException
redoTo in class UndoManagerCannotRedoExceptionpublic boolean canRedo()
UndoRedo
canRedo in interface UndoableEditcanRedo in interface UndoRedocanRedo in class UndoManagertrue if redo is allowed
public void undoOrRedo()
throws CannotRedoException,
CannotUndoException
undoOrRedo in class UndoManagerCannotRedoException
CannotUndoExceptionpublic boolean canUndoOrRedo()
canUndoOrRedo in class UndoManagerpublic int getLimit()
getLimit in class UndoManagerpublic void setLimit(int l)
setLimit in class UndoManagerprotected void trimForLimit()
trimForLimit in class UndoManager
protected void trimEdits(int from,
int to)
trimEdits in class UndoManagerpublic void discardAllEdits()
discardAllEdits in class UndoManagerprotected UndoableEdit lastEdit()
lastEdit in class CompoundEditprotected UndoableEdit editToBeUndone()
editToBeUndone in class UndoManagerprotected UndoableEdit editToBeRedone()
editToBeRedone in class UndoManagerpublic void undoableEditHappened(UndoableEditEvent ue)
undoableEditHappened in interface UndoableEditListenerundoableEditHappened in class UndoManagerue - the editpublic boolean addEdit(UndoableEdit anEdit)
addEdit in interface UndoableEditaddEdit in class UndoManagerpublic boolean replaceEdit(UndoableEdit anEdit)
replaceEdit in interface UndoableEditreplaceEdit in class AbstractUndoableEditpublic boolean isSignificant()
isSignificant in interface UndoableEditisSignificant in class CompoundEditpublic String getPresentationName()
getPresentationName in interface UndoableEditgetPresentationName in class CompoundEditpublic String getUndoPresentationName()
UndoRedo
getUndoPresentationName in interface UndoableEditgetUndoPresentationName in interface UndoRedogetUndoPresentationName in class UndoManagerpublic String getRedoPresentationName()
UndoRedo
getRedoPresentationName in interface UndoableEditgetRedoPresentationName in interface UndoRedogetRedoPresentationName in class UndoManagerpublic String getUndoOrRedoPresentationName()
getUndoOrRedoPresentationName in class UndoManagerpublic String toString()
toString in class UndoManagerpublic void addChangeListener(ChangeListener l)
UndoRedo
addChangeListener in interface UndoRedol - the listener to addpublic void removeChangeListener(ChangeListener l)
UndoRedo
removeChangeListener in interface UndoRedol - the listener to removeUndoRedo.addChangeListener(javax.swing.event.ChangeListener)
|
org.openide.awt 7.55.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||