|
|||||||||
| 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
com.jaxfront.core.util.undo.UndoManagerWrapper
com.jaxfront.core.util.undo.JAXFrontUndoManager
public class JAXFrontUndoManager
| Constructor Summary | |
|---|---|
JAXFrontUndoManager(Document dom)
|
|
| Method Summary | |
|---|---|
void |
abortCompoundEdit()
|
void |
addChangeSerializationUndoableEditEvent(java.lang.Object eventSource,
Type target,
boolean newValue,
boolean oldValue)
|
void |
addChoiceChangeUndoableEditEvent(java.lang.Object eventSource,
Type target,
Type newValue,
Type oldValue,
boolean isTemporary)
|
void |
addListChangeEditEvent(java.lang.Object eventSource,
ListType target,
Type listItem,
int index,
short action)
|
void |
addListItemMovedEvent(java.lang.Object eventSource,
ListType target,
int from,
int to)
|
void |
addListSortEvent(java.lang.Object eventSource,
ListType target,
int direction,
int inverseDirection,
java.lang.String actionName)
|
void |
addMacroEdit(javax.swing.undo.UndoableEdit edit)
|
void |
addPasteUndoableEditEvent(java.lang.Object eventSource,
Type target,
java.lang.String newValue,
java.lang.String oldValue,
boolean isTemporary)
|
void |
addPropertyChangeEditEvent(java.lang.Object eventSource,
SimpleType target,
java.lang.String newValue,
java.lang.String oldValue)
|
void |
addRecursionEventUndoableEditWrapper(java.lang.Object eventSource,
Type recursionType,
short action)
|
void |
addUndoableEditListener(javax.swing.event.UndoableEditListener listener)
Adds an undo listener for notification of any changes. |
void |
blockInput(boolean blocked)
|
boolean |
canMacroRedo()
|
boolean |
canMacroRedo(int from)
|
boolean |
canMacroUndo()
|
boolean |
canMacroUndo(int from)
|
void |
createFromSerialize(org.w3c.dom.Document serialDom)
|
void |
discardAllEdits()
Empty the undo manager, sending each edit a die message in the process. |
java.util.List |
getEditSteps()
|
int |
getMaxEditIndex()
|
int |
getNextEditIndex()
|
javax.swing.event.UndoableEditListener[] |
getUndoableEditListeners()
Returns an array of all the undoable edit listeners registered on this document. |
boolean |
isBlocked()
|
boolean |
isInCompoundEditState()
|
boolean |
isRedoing()
|
boolean |
isUndoing()
|
void |
macroRedo()
|
void |
macroRedo(int from)
|
void |
macroUndo()
|
void |
macroUndo(int from)
|
static JAXFrontUndoableEdit |
parseEventObject(JAXFrontUndoManager manager,
javax.swing.undo.UndoableEdit edit,
Document dom,
org.w3c.dom.Element event,
java.util.List edits)
|
void |
redo()
If this UndoManager is inProgress, redoes the last significant UndoableEdit at indexOfNextAdd or after, and all insignificant edits up to it. |
void |
release()
|
void |
removeUndoableEditListener(javax.swing.event.UndoableEditListener listener)
Removes an undo listener. |
java.lang.String |
serializeUndoManager()
|
void |
serializeUndoManager(java.io.File location)
|
void |
serializeUndoManager(java.io.File location,
java.util.List editList)
|
void |
serializeUndoManager(java.io.PrintWriter writer)
|
void |
serializeUndoManager(java.io.PrintWriter writer,
java.util.List editList)
|
void |
startCompoundEdit()
|
void |
stopCompoundEdit()
|
void |
undo()
If this UndoManager is inProgress, undo the last significant UndoableEdit before indexOfNextAdd, and all insignificant edits back to it. |
void |
undo(boolean onlyLastSignificant)
|
void |
undoableEditHappened(javax.swing.event.UndoableEditEvent e)
Called by the UndoabledEdit sources this UndoManager listens to. |
void |
undoAll()
|
void |
write(java.lang.String url)
|
| Methods inherited from class com.jaxfront.core.util.undo.UndoManagerWrapper |
|---|
addEdit, canRedo, canUndo, canUndoOrRedo, end, getLastEditStep, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, setLimit, toString, undoOrRedo |
| Methods inherited from class javax.swing.undo.CompoundEdit |
|---|
die, getPresentationName, isInProgress, isSignificant |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
replaceEdit |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JAXFrontUndoManager(Document dom)
| Method Detail |
|---|
public void abortCompoundEdit()
public void addChangeSerializationUndoableEditEvent(java.lang.Object eventSource,
Type target,
boolean newValue,
boolean oldValue)
public void addChoiceChangeUndoableEditEvent(java.lang.Object eventSource,
Type target,
Type newValue,
Type oldValue,
boolean isTemporary)
public void addListChangeEditEvent(java.lang.Object eventSource,
ListType target,
Type listItem,
int index,
short action)
public void addListItemMovedEvent(java.lang.Object eventSource,
ListType target,
int from,
int to)
public void addListSortEvent(java.lang.Object eventSource,
ListType target,
int direction,
int inverseDirection,
java.lang.String actionName)
public void addMacroEdit(javax.swing.undo.UndoableEdit edit)
public void addPasteUndoableEditEvent(java.lang.Object eventSource,
Type target,
java.lang.String newValue,
java.lang.String oldValue,
boolean isTemporary)
public void addPropertyChangeEditEvent(java.lang.Object eventSource,
SimpleType target,
java.lang.String newValue,
java.lang.String oldValue)
public void addRecursionEventUndoableEditWrapper(java.lang.Object eventSource,
Type recursionType,
short action)
public void addUndoableEditListener(javax.swing.event.UndoableEditListener listener)
UndoableEdit will cause the
appropriate DocumentEvent to be fired to keep the view(s) in sync with the model.
listener - the UndoableEditListener to addDocument#addUndoableEditListenerpublic void blockInput(boolean blocked)
public boolean canMacroRedo()
public boolean canMacroRedo(int from)
public boolean canMacroUndo()
throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException
public boolean canMacroUndo(int from)
throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoExceptionpublic void createFromSerialize(org.w3c.dom.Document serialDom)
public void discardAllEdits()
UndoManagerWrapper
discardAllEdits in class UndoManagerWrapperpublic java.util.List getEditSteps()
public int getMaxEditIndex()
public int getNextEditIndex()
public javax.swing.event.UndoableEditListener[] getUndoableEditListeners()
UndoableEditListeners or an empty array if no undoable edit listeners are currently registeredaddUndoableEditListener(javax.swing.event.UndoableEditListener),
removeUndoableEditListener(javax.swing.event.UndoableEditListener)public boolean isBlocked()
public boolean isInCompoundEditState()
public boolean isRedoing()
public boolean isUndoing()
public void macroRedo()
public void macroRedo(int from)
public void macroUndo()
throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException
public void macroUndo(int from)
throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoException
public static JAXFrontUndoableEdit parseEventObject(JAXFrontUndoManager manager,
javax.swing.undo.UndoableEdit edit,
Document dom,
org.w3c.dom.Element event,
java.util.List edits)
public void redo()
throws javax.swing.undo.CannotRedoException
UndoManagerWrapperUndoManager is inProgress, redoes the last significant UndoableEdit at indexOfNextAdd or after, and all insignificant edits up to it. Updates indexOfNextAdd accordingly.
If not inProgress, indexOfNextAdd is ignored and super's routine is called.
redo in interface javax.swing.undo.UndoableEditredo in class UndoManagerWrapperjavax.swing.undo.CannotRedoExceptionCompoundEdit.end()public void release()
public void removeUndoableEditListener(javax.swing.event.UndoableEditListener listener)
listener - the UndoableEditListener to removeDocument#removeDocumentListenerpublic java.lang.String serializeUndoManager()
public void serializeUndoManager(java.io.File location)
throws java.io.IOException
java.io.IOException
public void serializeUndoManager(java.io.File location,
java.util.List editList)
throws java.io.IOException
java.io.IOExceptionpublic void serializeUndoManager(java.io.PrintWriter writer)
public void serializeUndoManager(java.io.PrintWriter writer,
java.util.List editList)
public void startCompoundEdit()
public void stopCompoundEdit()
public void undo()
throws javax.swing.undo.CannotUndoException
UndoManagerWrapperIf not inProgress, indexOfNextAdd is ignored and super's routine is called.
undo in interface javax.swing.undo.UndoableEditundo in class UndoManagerWrapperjavax.swing.undo.CannotUndoExceptionCompoundEdit.end()
public void undo(boolean onlyLastSignificant)
throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoExceptionpublic void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
UndoManagerWrapper
undoableEditHappened in interface javax.swing.event.UndoableEditListenerundoableEditHappened in class UndoManagerWrapperUndoManagerWrapper.addEdit(javax.swing.undo.UndoableEdit)
public void undoAll()
throws javax.swing.undo.CannotUndoException
javax.swing.undo.CannotUndoExceptionpublic void write(java.lang.String url)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||